RE: Highlighting edittext boxes

new topic     » goto parent     » topic index » view thread      » older message » newer message

And I just thought of another even cleaner method.  Just an example of 
the many possible ways to accomplish the same thing...
----------------------------------------
include Win32Lib.ew
without warning

constant
   Win = create( Window, "Test", 0, Default, Default, 200, 150, 0 ),
   Edt = { create( EditText, "text1", Win, 10, 10, 150, 20, 0 ),
           create( EditText, "text2", Win, 10, 40, 150, 20, 0 ),
           create( EditText, "text3", Win, 10, 70, 150, 20, 0 ) }

procedure InverseVideo(integer self, integer event, sequence parms)
   setIndex(self,{1,0})
end procedure
setHandler( Edt, w32HGotFocus, routine_id("InverseVideo") )

WinMain( Win, Normal )
----------------------------------------
-- Brian
Brian Broker wrote:
> Alternatively, you could do it this way:
> ----------------------------------------
> include Win32Lib.ew
> without warning
> 
> constant
>    MainWin = create( Window, "Testing", 0, Default, Default, 
>                                            200, 150, 0 ),
>    Edit1 = create( EditText, "text1", MainWin, 10, 10, 150, 20, 0 ),
>    Edit2 = create( EditText, "text2", MainWin, 10, 40, 150, 20, 0 ),
>    Edit3 = create( EditText, "text3", MainWin, 10, 70, 150, 20, 0 )
> 
> procedure InverseVideo(integer self, integer event, sequence parms)
>    setIndex(self,{1,0})
> end procedure
> setHandler({Edit1,Edit2,Edit3},w32HGotFocus,
>                                routine_id("InverseVideo"))
> 
> WinMain( MainWin, Normal )
> ----------------------------------------
> 
> -- Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu