1. win32lib tabcontrol bug
- Posted by Tone Škoda <tone.skoda at zapo.net> Nov 23, 2001
- 420 views
When a tab item is selected, Win32Lib shows ALL windows which belong to that tab item. This is not good. What if I have some hidden window in tab item which I don't want to be shown at that time? Solution: Because when tab item becomes deselected Win32Lib hides all its windows, there is no way you can know which windows were hidden and which visible when tab item was active. So Win32Lib should probably have a list of hidden and visible windows for all tab items, and from that we would know which windows to show and which not. Problem is in Win32Lib.ew 0.56 in activateTabItems here: -- Show all the selected items for i = 1 to length(show) do setVisible(show[i], 1)
2. Re: win32lib tabcontrol bug
- Posted by euman at bellsouth.net Nov 23, 2001
- 398 views
Tone, I use something like this and keep track of the items as they are created -- setVisible True/False --------------------------------------------- global constant show = 1, hide = 0 global sequence controls controls = {} global procedure Visible(integer SorH) integer len, handle object VOID len = length(controls) for x = 1 to len do handle = getHandle(controls[x]) VOID = c_func(xShowWindow, {handle ,SorH}) end for end procedure integer Sle_Group, Sle_Manufacturer, Sle_Partname Sle_Manufacturer = create(EditText, "", ChildWin, 10, 25, 180, 20, 0) Sle_Partname = create(EditText, "", ChildWin, 200, 25, 163, 20, 0) Sle_Partnumber = create(EditText, "", ChildWin, 365, 25, 163, 20, 0) procedure Child_controls(integer SorH) --Show or Hide controls = {Sle_Manufacturer, Sle_Partname, Sle_Partnumber, Sle_Supplier} Visible(SorH) setFocus(ChildWin) end procedure Child_controls(1) By specifying the controls in the procedure as a sequence (much like a pointer system) when I eventually call on the Visible( ) procedure each control in the controls sequence take on the hidden or visible state depending on SorH value being 0 for hidden or 1 for visible. I the case above, controls = {Sle_Manufacturer, Sle_Partname, Sle_Partnumber, Sle_Supplier} ......... etc all controls in this sequence will be visible Really easy and one of the fastest and less confusing ways for me to implement this feature.. Euman euman at bellsouth.net > When a tab item is selected, Win32Lib shows ALL windows which belong to that > tab item. This is not good. What if I have some hidden window in tab item > which I don't want to be shown at that time? > > Solution: Because when tab item becomes deselected Win32Lib hides all > its windows, there is no way you can know which windows were > hidden and which visible when tab item was active. > So Win32Lib should probably have a list of hidden and visible windows for > all tab items, and from that we would know which windows to show and which > not. > > Problem is in Win32Lib.ew 0.56 in activateTabItems here: > > -- Show all the selected items > for i = 1 to length(show) do > setVisible(show[i], 1) > > > >
3. Re: win32lib tabcontrol bug
- Posted by Tone Škoda <tone.skoda at zapo.net> Nov 24, 2001
- 400 views
Thanks Euman, but Win32Lib should handle this internally. After all, its goal is to be as simple as possible. A lot of things are still missing in Win32Lib. For example, for treeview and its items, geting root parent item of item handle, which at a row is the item, etc. I had to write all those routines. It would be nice if I could add them to Win32Lib so that someone else woldn't have to be rewriting them. ----- Original Message ----- From: <euman at bellsouth.net> To: "EUforum" <EUforum at topica.com> Subject: Re: win32lib tabcontrol bug > > Tone, I use something like this and keep track of the items as they are created > > -- setVisible True/False --------------------------------------------- > > global constant show = 1, > hide = 0 > > global sequence controls > controls = {} > > global procedure Visible(integer SorH) > integer len, handle > object VOID > len = length(controls) > for x = 1 to len do > handle = getHandle(controls[x]) > VOID = c_func(xShowWindow, {handle ,SorH}) > end for > end procedure > > integer Sle_Group, Sle_Manufacturer, Sle_Partname > > Sle_Manufacturer = create(EditText, "", ChildWin, 10, 25, 180, 20, 0) > Sle_Partname = create(EditText, "", ChildWin, 200, 25, 163, 20, 0) > Sle_Partnumber = create(EditText, "", ChildWin, 365, 25, 163, 20, 0) > > procedure Child_controls(integer SorH) --Show or Hide > controls = {Sle_Manufacturer, Sle_Partname, Sle_Partnumber, Sle_Supplier} > > Visible(SorH) > setFocus(ChildWin) > end procedure > > Child_controls(1) > > By specifying the controls in the procedure as a sequence (much like a pointer system) > when I eventually call on the Visible( ) procedure each control in the controls sequence > take on the hidden or visible state depending on SorH value being 0 for hidden or 1 > for visible. > > > I the case above, > controls = {Sle_Manufacturer, Sle_Partname, Sle_Partnumber, Sle_Supplier} > ......... etc > > all controls in this sequence will be visible > > Really easy and one of the fastest and less confusing ways for me to implement this feature.. > > Euman > euman at bellsouth.net > > > > When a tab item is selected, Win32Lib shows ALL windows which belong to that > > tab item. This is not good. What if I have some hidden window in tab item > > which I don't want to be shown at that time? > > > > Solution: Because when tab item becomes deselected Win32Lib hides all > > its windows, there is no way you can know which windows were > > hidden and which visible when tab item was active. > > So Win32Lib should probably have a list of hidden and visible windows for > > all tab items, and from that we would know which windows to show and which > > not. > > > > Problem is in Win32Lib.ew 0.56 in activateTabItems here: > > > > -- Show all the selected items > > for i = 1 to length(show) do > > setVisible(show[i], 1) > > > > > > >