Re: Unable to unset WS_VISIBLE flag for some win32lib controls

new topic     » goto parent     » topic index » view thread      » older message » newer message
AlanOxley said...

OK thanks Larry, I will try setting up a modified defaults flag as a constant, and use that wherever I have a control that should be not visible initially. I know is not as easy to code as simply using setVisible(control,0) but I feel its a bit lame to define something only to immediately change it again before you have even used it.

Actually, I find it quite common to "create" a control on one line, then "set it up" on several more. Seems to me that there are sections to a program: include, create, initialize, events, and finally, run.

-- include
include Win32Lib.ew 
without warning 
 
-- create 
constant Window1    = create( Window, "TextBox", 0, Default, Default, 400, 300, 0 ) 
constant LText1     = create( LText, "Enter your text here:", Window1, 10, 10, 370, 20, 0 ) 
constant RichEdit1  = create( RichEdit, "", Window1, 10, 30, 370, 230, 0 ) 
 
-- initialize 
addStyle( Window1, {0,WS_EX_CLIENTEDGE} ) 
setTextColor( LText1, BrightRed ) 
setFont( RichEdit1, "Courier New", 10, Normal ) 
 
-- events 
--(none) 
 
-- run 
WinMain( Window1, Normal ) 


-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu