W32?

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

------=_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>&nbsp;</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>&nbsp;</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&nbsp;method?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</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>&nbsp;&nbsp; for x =3D 1 to length(controls)=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
setVisible(controls[x],True)<BR>&nbsp;&nbsp; end for<BR>end=20
procedure</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>global procedure =
setVisible_False()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; for x =3D 1 to =
length(controls)=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
setVisible(controls[x],False)<BR>&nbsp;&nbsp; end for<BR>end=20
procedure</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>global procedure procSafety() -- =
if&nbsp;safety=20
menu item pressed <BR>&nbsp;&nbsp; setVisible_False()<BR>&nbsp;&nbsp; =
controls =3D=20
{SToolbar,SRE}&nbsp;<BR>&nbsp;&nbsp; setVisible_True()<BR>end=20
procedure</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>global procedure procParts_List() --=20
if&nbsp;Part_List menu item pressed&nbsp;<BR></FONT><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp; setVisible_False()<BR>&nbsp;&nbsp; controls =3D=20
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; setVisible_True()<BR>end=20
procedure</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2>of course, at the end&nbsp;of =
each seperate=20
include file I must do the following</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2>&nbsp;&nbsp; controls =3D =
{contol_id,=20
control_id, etc, etc}&nbsp;-- setup controls sequence based on created =
controls=20
in include file<BR>&nbsp;&nbsp; setVisible_False() -- initially set the =
controls=20
invisible...until called by there prospective procedure<BR>&nbsp;&nbsp;=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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT =

------=_NextPart_000_0010_01C05183.BB92CE60--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu