Dear Perl Monks,
i am using Tk::JComboBox.
i can able to selecting first and second combo's data for the first time,later i can not select the second combo box
if i use TK::BrowseEntry it is working fine
please refer my code
use Tk;
use Tk::JComboBox;
my $ScreenSize = "300x200+0+0";
&Screen;
MainLoop;
sub Screen {
$MainScreenObject = MainWindow->new(-background =>"white");
$MainScreenObject->geometry($ScreenSize);
@TestList = ('12','123','12345');
$test= createComboBox('Test',5,100,50);
$test1= createComboBox('Test1',5,100,100);
}
sub onTestComboBoxSelect {
@TestList1 = ('1','3','125');
$test1->configure(-choices => \@TestList1 ,-state => 'normal');
+
}
sub onTest1ComboBoxSelect {
}
sub createComboBox {
my($ComboBoxName,$Width,$x,$y) = @_;
$ComboBoxName =~ s/\s+//g;
my $ComboBoxObject = $MainScreenObject->JComboBox(-background =>'w
+hite',
-textvariable => \${$ComboBoxName},
-choices => \@{$ComboBoxName."List"},
-browsecmd =>\&{"on".$ComboBoxName."ComboBoxSelect"}
+,
-entrywidth =>$Width,)->place(-x=>$x,-y=>$y);
return($ComboBoxObject);
}
please help me on this
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.