1. help please whit concatenation

how do i take a variable from a text box if my tex box is like  this
constant EDIT = create(MultiEditText,  "", 0, POPUP,4,38,180,
19,{0,WS_EX_CLIENTEDGE})
</eucode
and i want to use what i enter in this  text box to concatenate with what is
typed in this other text box
}}}
<eucode>
constant EDIT1 = create(MultiEditText,  "", 0, POPUP,4,38,180,
19,{0,WS_EX_CLIENTEDGE})

can i concatenate them like this edit + edit1 = edited
thanks

new topic     » topic index » view message » categorize

2. Re: help please whit concatenation

hebert rangel wrote:
> 
> 
> how do i take a variable from a text box if my tex box is like  this
> }}}
<eucode>
> constant EDIT = create(MultiEditText,  "", 0, POPUP,4,38,180,
> 19,{0,WS_EX_CLIENTEDGE})
> </eucode
> and i want to use what i enter in this  text box to concatenate with what is
> typed in this other text box
> }}}
<eucode>
> constant EDIT1 = create(MultiEditText,  "", 0, POPUP,4,38,180,
> 19,{0,WS_EX_CLIENTEDGE})
> </eucode>
{{{

> can i concatenate them like this edit + edit1 = edited

Yes:
sequence edit, edit1, edited
    edit = getText( EDIT )
    edit1 = getText( EDIT1 )
    edited = edit & edited


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

3. Re: help please whit concatenation

> how do i take a variable from a text box if my tex box is like  this
> }}}
<eucode>
> constant EDIT = create(MultiEditText,  "", 0, POPUP,4,38,180,
> 19,{0,WS_EX_CLIENTEDGE})
> </eucode
> and i want to use what i enter in this  text box to concatenate with what is
> typed in this other text box
> }}}
<eucode>
> constant EDIT1 = create(MultiEditText,  "", 0, POPUP,4,38,180,
> 19,{0,WS_EX_CLIENTEDGE})
> </eucode>
{{{

> can i concatenate them like this edit + edit1 = edited
> thanks

Here's an interactive version that does it on the fly:

include Win32Lib.ew

constant Main = create( Window, "Concatenation Demo", 0, Center,
Center, 320, 72, 0 )
constant Text1 = create( EditText, "", Main, 2, 2, 308, 20, 0 )
constant Text2 = create( EditText, "", Main, 2, 24, 308, 20, 0 )

sequence vLockedText
    vLockedText = ""

procedure Text1_KeyPress( integer pSelf, integer pEvent, sequence pParams )

    -- a key was pressed in Text1, append
    -- any entered text into Text2

    integer keyCode, shift
    sequence lTempText, lSelection

    keyCode = pParams[1]
    shift = pParams[2]

    lTempText = getText( Text1 )

    -- adjust for backspace
    if keyCode = VK_BACKSPACE then

    -- ignore return
    elsif keyCode = VK_RETURN then
        -- do nothing
		
    else
        lTempText &= keyCode
		
    end if

    setText( Text2, vLockedText & lTempText )

end procedure
setHandler( Text1, w32HKeyPress, routine_id("Text1_KeyPress") )

procedure Text2_LostFocus( integer pSelf, integer pEvent, sequence pParams )

    -- Text2 lost focus, lock in the
    -- text that was typed

    vLockedText = getText( Text2 )

end procedure
setHandler( Text2, w32HLostFocus, routine_id("Text2_LostFocus") )

WinMain( Main, Normal )


~Greg

new topic     » goto parent     » topic index » view message » categorize

4. Re: help please whit concatenation

Matt Lewis wrote:
> 
> hebert rangel wrote:
> > 
> > 
> > how do i take a variable from a text box if my tex box is like  this
> > }}}
<eucode>
> > constant EDIT = create(MultiEditText,  "", 0, POPUP,4,38,180,
> > 19,{0,WS_EX_CLIENTEDGE})
> > </eucode
> > and i want to use what i enter in this  text box to concatenate with what is
> > typed in this other text box
> > }}}
<eucode>
> > constant EDIT1 = create(MultiEditText,  "", 0, POPUP,4,38,180,
> > 19,{0,WS_EX_CLIENTEDGE})
> > </eucode>
{{{

> > can i concatenate them like this edit + edit1 = edited
> 
> Yes:
> }}}
<eucode>
>     sequence edit, edit1, edited
>     edit = getText( EDIT )
>     edit1 = getText( EDIT1 )
>     edited = edit & edited
> </eucode>
{{{

> 
> Matt Lewis
> 
Matt,

Shouldn't the code be this instead?
sequence edit, edit1, edited
edit = getText( EDIT )
edit1 = getText( EDIT1 )
edited = edit & edit1


Later.

Ferlin Scarborough

Learn To Program Games in Free Courses At
http://www.gameuniv.net

My Euphoria Home Page
http://mywebpage.netscape.com/shadetreesoft

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu