Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
Mike, > I played with the tabstrip but didn't have any problems. Can you post some code? I've attached an incomplete Perl program showing my attempt to add controls to tab sheets. See what you think, and perhaps offer a correction. Regards, Ian. UserProperties.pl
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
From: "Ian Taite" <[EMAIL PROTECTED]> > I've got absolutely loads of questions, but now I am wary of posting them > for fear of being marked a total duffer; bosh :-) Post code with the questions, that will give us something to play with. I looked at pum.pl but am on Win98 so it won't run for me Where is our code example repository, BTW, I've mislaid the url. Rob http://bangkokwizard.com/snatch/ Everyone is entitled to my opinion.
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
I played with the tabstrip but didn't have any problems. Can you post some code? Mike David Hiltz wrote: > > Mike, Is there a way that CardLayout functionality could be built into the > > TabStrip control? Or perhaps it's there already, I just cant figure it out. > > > > CardLayout does a great job of hiding controls when you change cards. > > TabStrip doesn't seem to do that, it's all upto the programmer to maintain > > their own track of which controls are on which forms. > > I suggested that a "tabid => ?" option be added to all the componenets > so you could indicate which components belonged to which tabs - even > provided the subroutine that would handle the display and hiding of > the components automatically. ...but nobody responded. :( > > -david hiltz
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
CardLayout works through references and associative arrays. O'Reilly's 'Advanced Perl Programming' books chapters 1 && 2 were wonderful for explaining references. There are about 3 chapters on Tk but you can skip those :-) When you call the functions of CardLayout with calls like $card1 = new Win32::GUI::CardLayout($Window, "main"); you actually are passing 3 variables to the function. The first two are what is between the ( )'s the other is the object. Here it is $card1 and it becomes the object. when a widget is added to the cardlayout with $card1->add("OpenButton", "main"); again you are passing 3 variables to the function and add() creates a reference to an annonymous array and puts this array value into the key 'content' of the associtave array for that object. this array builds as you put more widgets onto the same card. when you want to show a card the @{...} is what dereferences the array and loops through all of its widgets for that window. all of the widgets that belong to the card you want to view are put through ->show() and the ones that aren't are run through ->hide(). the window you create the object with $card1 = new Win32::GUI::CardLayout($Window, "main"); becomes the first card in the series and the last card you declare will become the last card. Hope this helps. Mike Oh yea, "There doesn't seem to be much there for a package that does so much good." THANKS!!! Ian Taite wrote: > I saw your previous postings on this subject. I too, recently posted several > messages without reply. A subsequent search of this discussion group > revealed a 'guitut5' for my question (amidst 66 other postings); even a > recommendation to search for that would have been welcome at the time, as a > time saver. I don't know whether our readers think my questions are too > simple or my examples are too complex, but this is one module where 'RTFM > advice' wont get me all that far. Jenda's GUI samples are a step forward, > but as you might know from the TabStrip example, all it shows is the tab > strip. > > I've got absolutely loads of questions, but now I am wary of posting them > for fear of being marked a total duffer; everyone learns from square one > though. > > In the past few weeks, I've learned about GUI's, sending SMTP mail, > accessing the registry, ASDI, and I've experimented with LDAP - I am > gradually improving my programming expertise however, this module is > somewhat frustrating. > > Do you know of a repository of scripts that exploit Win32-GUI specifically, > I was thinking that a variety of examples would at least offer some clue as > to what is possible, as an adjunct to the standard docs. > > I've looked through CardLayout.pm to see what it does. There doesn't seem to > be much there for a package that does so much good. Guess I'll just have to > learn references and linked lists; I assume that is the mechanism that > allows this module to work. > > Ian. > [EMAIL PROTECTED]
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
I just saw these two postings after I sent my last message. I will play with the tabstrip and see what I can do. Mike David Hiltz wrote: > > Mike, Is there a way that CardLayout functionality could be built into the > > TabStrip control? Or perhaps it's there already, I just cant figure it out. > > > > CardLayout does a great job of hiding controls when you change cards. > > TabStrip doesn't seem to do that, it's all upto the programmer to maintain > > their own track of which controls are on which forms. > > I suggested that a "tabid => ?" option be added to all the componenets > so you could indicate which components belonged to which tabs - even > provided the subroutine that would handle the display and hiding of > the components automatically. ...but nobody responded. :( > > -david hiltz
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
If you tabstrip is not hiding controls there may be a problem with the tabstrip. Can't tell be the description. Could you post the code? Maybe someone will find the problem somewhere. Mike Ian Taite wrote: > Mike, Is there a way that CardLayout functionality could be built into the > TabStrip control? Or perhaps it's there already, I just cant figure it out. > > CardLayout does a great job of hiding controls when you change cards. > TabStrip doesn't seem to do that, it's all upto the programmer to maintain > their own track of which controls are on which forms. > > Ian. > > [EMAIL PROTECTED]
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
I saw your previous postings on this subject. I too, recently posted several messages without reply. A subsequent search of this discussion group revealed a 'guitut5' for my question (amidst 66 other postings); even a recommendation to search for that would have been welcome at the time, as a time saver. I don't know whether our readers think my questions are too simple or my examples are too complex, but this is one module where 'RTFM advice' wont get me all that far. Jenda's GUI samples are a step forward, but as you might know from the TabStrip example, all it shows is the tab strip. I've got absolutely loads of questions, but now I am wary of posting them for fear of being marked a total duffer; everyone learns from square one though. In the past few weeks, I've learned about GUI's, sending SMTP mail, accessing the registry, ASDI, and I've experimented with LDAP - I am gradually improving my programming expertise however, this module is somewhat frustrating. Do you know of a repository of scripts that exploit Win32-GUI specifically, I was thinking that a variety of examples would at least offer some clue as to what is possible, as an adjunct to the standard docs. I've looked through CardLayout.pm to see what it does. There doesn't seem to be much there for a package that does so much good. Guess I'll just have to learn references and linked lists; I assume that is the mechanism that allows this module to work. Ian. [EMAIL PROTECTED]
Re: [perl-win32-gui] FAO: Mike Kangas Re: CardLaout / TabStrip hybrid
> Mike, Is there a way that CardLayout functionality could be built into the > TabStrip control? Or perhaps it's there already, I just cant figure it out. > > CardLayout does a great job of hiding controls when you change cards. > TabStrip doesn't seem to do that, it's all upto the programmer to maintain > their own track of which controls are on which forms. I suggested that a "tabid => ?" option be added to all the componenets so you could indicate which components belonged to which tabs - even provided the subroutine that would handle the display and hiding of the components automatically. ...but nobody responded. :( -david hiltz