Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Help with tabstops in Win32::GUI

by ChrisR (Hermit)
on Apr 14, 2005 at 20:11 UTC ( [id://447951]=note: print w/replies, xml ) Need Help??


in reply to Re: Help with tabstops in Win32::GUI
in thread Help with tabstops in Win32::GUI

ok, I was just trying to become familiar with the tabstrip not using any kind of wrapper like tabframe or tabstripgroup. I thought it would be a good idea but things are getting worse. When I run the code below and hit tab, it takes me to currently selected tab label/button and does not tab between the textfields. What am I doing wrong here??
#!c:\perl\bin\wperl.exe use strict; use Win32::GUI; my $mainform; $mainform = Win32::GUI::Window->new(-name=>'main',-text=>'tabstrip tes +t',-width=>800,-height=>600,-dialogui=>1); $mainform->AddTabStrip(-name=>"tab",-width=>770,-height=>550,-left=>10 +,-top=>10); $mainform->tab->InsertItem(-name=>'Tab1',-text=>" Tab1 ",-border=>0,to +p=>10,-addstyle=>WS_TABSTOP); $mainform->tab->AddTextfield(-name=>'text1',-top=>50,-left=>50,-text=> +"text #1",-addstyle=>WS_TABSTOP,-width=>150,-height=>20); $mainform->tab->AddTextfield(-name=>'text2',-top=>80,-left=>50,-text=> +"text #2",-addstyle=>WS_TABSTOP,-width=>150,-height=>20); $mainform->tab->AddTextfield(-name=>'text3',-top=>110,-left=>50,-text= +>"text #3",-addstyle=>WS_TABSTOP,-width=>150,-height=>20); $mainform->tab->AddTextfield(-name=>'text4',-top=>140,-left=>50,-text= +>"text #4",-addstyle=>WS_TABSTOP,-width=>150,-height=>20); $mainform->tab->InsertItem(-name=>'Tab2',-text=>" Tab2 ",-border=>0,to +p=>10,-addstyle=>WS_TABSTOP); $mainform->tab->InsertItem(-name=>'Tab3',-text=>" Tab3 ",-border=>0,to +p=>10,-addstyle=>WS_TABSTOP); $mainform->Show(); Win32::GUI::Dialog(); exit; main_Terminate { $mainform->Hide(); return -1; }

Replies are listed 'Best First'.
Re^3: Help with tabstops in Win32::GUI
by jplindstrom (Monsignor) on Apr 15, 2005 at 13:41 UTC
    You should not AddXXX to the TabStrip object, you should add them to the window $mainform. Then you use e.g. Win32::GUI::TabStripGroup to manage the controls for you.

    If you use The GUI Loft, all this is automagically taken care of for you.

    /J

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447951]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-16 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found