Changeset 5184 for extensions/pLoader/trunk/src/Uploader/GUI/Layout/PhotoPropertiesCategoriesTags.pm
- Timestamp:
- Mar 19, 2010, 6:50:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/Layout/PhotoPropertiesCategoriesTags.pm
r5122 r5184 12 12 use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL ); 13 13 use Wx qw( wxTR_HAS_BUTTONS wxTR_LINES_AT_ROOT wxSUNKEN_BORDER wxLI_HORIZONTAL wxTE_MULTILINE ); 14 use Wx qw( wxDP_DROPDOWN );14 use Wx qw( wxDP_DROPDOWN wxCB_READONLY); 15 15 16 16 # Bitmap functions … … 117 117 my $topsizer = Wx::BoxSizer->new( wxVERTICAL ); 118 118 119 $topsizer->Add( 120 TextField(119 $topsizer->Add( 120 ComboField( 121 121 $parent, 122 122 $main::CAPTION, … … 314 314 } 315 315 316 317 sub ComboField { 318 my ( $parent, $id_label, $id_ctrl, $expand ) = @_; 319 320 $expand ||=0; 321 322 my( $sizer ) = Wx::BoxSizer->new( wxVERTICAL ); 323 324 $expand||=0; 325 326 $sizer->Add( 327 Wx::StaticText->new( 328 $parent, 329 $id_label, 330 "text", 331 wxDefaultPosition, 332 wxDefaultSize, 333 0 334 ), 335 0, 336 wxALL, 337 1 338 ); 339 340 my $ctrl = Wx::ComboBox->new( 341 $parent, 342 $id_ctrl, 343 "", 344 wxDefaultPosition, 345 [-1,-1], 346 [], 347 348 ); 349 350 # the EVT_COMBOBOX has set _value if we need to overwrite the default 351 # text. The list contains function names. We want to have the value returned by the function 352 # in the text field 353 Wx::Event::EVT_IDLE( 354 $ctrl, 355 sub { 356 my ( $ctrl, $event ) = @_; 357 if(exists $ctrl->{_value}){ 358 $ctrl->SetValue($ctrl->{_value}) if !$ctrl->{_multi_selection_mode}; 359 delete $ctrl->{_value}; 360 delete $ctrl->{_multi_selection_mode}; 361 } 362 } 363 ); 364 365 366 $sizer->Add( 367 $ctrl, 368 $expand, 369 wxEXPAND|wxALL, 370 1 371 ); 372 373 374 375 $sizer; 376 } 377 378 316 379 sub _multi_selection_mode_panel_layout{ 317 380 my ( $panel ) = @_; … … 335 398 336 399 } 400 401 1; 402
Note: See TracChangeset
for help on using the changeset viewer.