Esteemed monks,
With Tk::JComboBox in this code fragment (part of a rather large GUI the rest of which works rather well);
$frfr->Label( -text => 'Campaign' )->grid( -column => 0, -row => 0 )
+;
$frfr->Checkbutton(
-text => 'enabled',
-variable => \$self->{_campaigns_filter_flag},
#-command => sub { $self->_campaigns_filter_flag_change(); },
-command => sub { $self->_get_records_all(); },
)->grid(
$self->{_campaign_list} = $frfr->JComboBox(
-relief => 'sunken',
-highlightthickness => 0,
-mode => 'readonly',
-listwidth => '16',
-entrywidth => '16',
#-listcmd => sub { $self->_campaign_list_load() },
),
-padx => 2,
-pady => 1,
);
$self->{_campaign_list}->configure( -subwidgets => [ Listbox => { -b
+ackground => 'white' }, ] );
$self->{_campaign_list}->configure( -selectcommand => sub { $self->_
+campaign_filter_set( $self->{_campaign_list} ); } );
#$self->_campaign_list_load();
$self->{_campaign_list}->configure( -popupcreate => sub { $self->_ca
+mpaign_list_load() } );
The issues:
- When called separately the $self->_campaign_list_load(); loads the listbox just fine. But the ist is somewhat dynamic, so I want to load it before the Listbox is drawn ech time. According the docs, this $self->{_campaign_list}->configure( -popupcreate => sub { $self->_campaign_list_load() } ); should cause the list to be loaded before the popup is displayed. But it doesn't. Any suggestions?
- Under some combinations I can get the listbox being created 'separately', it will appear in the upper left hand corner of the screen regardless of any other settings.
Any clues?
jdtoronto
Update The author has made some changes and expects that v1.12 of the module will address these issues. Thanks Rob for your timely response!
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.