W32?
- Posted by Euman <euman at BELLSOUTH.NET> Nov 18, 2000
- 361 views
------=_NextPart_000_0010_01C05183.BB92CE60 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, In Win32Lib is there a better way to do the below example? If I have a menu with multiple selectable items and rather than = construct or call on a new window to display different controls for each menuitem would there be a better = method? include Safety.e -- includes controls that will later be displayed with = procedure (procSafety) below include partlist.e -- includes controls that will later be displayed = with procedure (procPart_List) below global procedure setVisible_True() for x =3D 1 to length(controls) do setVisible(controls[x],True) end for end procedure global procedure setVisible_False() for x =3D 1 to length(controls) do setVisible(controls[x],False) end for end procedure global procedure procSafety() -- if safety menu item pressed=20 setVisible_False() controls =3D {SToolbar,SRE}=20 setVisible_True() end procedure global procedure procParts_List() -- if Part_List menu item pressed=20 setVisible_False() controls =3D {StatusBar,TreeView,ListView,PLToolbar,aChildWindow} setVisible_True() end procedure of course, at the end of each seperate include file I must do the = following controls =3D {contol_id, control_id, etc, etc} -- setup controls = sequence based on created controls in include file setVisible_False() -- initially set the controls invisible...until = called by there prospective procedure =20 In Win32Lib Code, could there be a way to do the same thing based on the seperate includes? Thanks, euman at bellsouth.net ------=_NextPart_000_0010_01C05183.BB92CE60 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>In Win32Lib is there a better way to do = the below=20 example?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>If I have a menu with multiple = selectable items and=20 rather than construct or call on a new window</FONT></DIV> <DIV><FONT face=3DArial size=3D2>to display different controls for each = menuitem=20 would there be a better method?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>include Safety.e -- includes controls = that will=20 later be displayed with procedure (procSafety) below</FONT></DIV> <DIV><FONT face=3DArial size=3D2>include partlist.e -- includes controls = that will=20 later be displayed with procedure (procPart_List) below</FONT></DIV> <DIV><FONT face=3DArial size=3D2><BR></FONT><FONT face=3DArial = size=3D2>global procedure=20 setVisible_True()<BR> for x =3D 1 to length(controls)=20 do<BR> =20 setVisible(controls[x],True)<BR> end for<BR>end=20 procedure</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>global procedure = setVisible_False()</FONT></DIV> <DIV><FONT face=3DArial size=3D2> for x =3D 1 to = length(controls)=20 do<BR> =20 setVisible(controls[x],False)<BR> end for<BR>end=20 procedure</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>global procedure procSafety() -- = if safety=20 menu item pressed <BR> setVisible_False()<BR> = controls =3D=20 {SToolbar,SRE} <BR> setVisible_True()<BR>end=20 procedure</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>global procedure procParts_List() --=20 if Part_List menu item pressed <BR></FONT><FONT face=3DArial=20 size=3D2> setVisible_False()<BR> controls =3D=20 <DIV><FONT face=3DArial size=3D2> setVisible_True()<BR>end=20 procedure</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial><FONT size=3D2>of course, at the end of = each seperate=20 include file I must do the following</FONT></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial><FONT size=3D2> controls =3D = {contol_id,=20 control_id, etc, etc} -- setup controls sequence based on created = controls=20 in include file<BR> setVisible_False() -- initially set the = controls=20 invisible...until called by there prospective procedure<BR> =20 </FONT></FONT></DIV> <DIV><FONT face=3DArial size=3D2>In Win32Lib Code, could there be a way = to do the=20 same thing based on the</FONT></DIV> <DIV><FONT face=3DArial size=3D2>seperate includes?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV> <DIV><FONT face=3DArial size=3D2><A=20 <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial><FONT = ------=_NextPart_000_0010_01C05183.BB92CE60--