Bugzilla – Attachment 155433 Details for
Bug 295485
repository names are cut off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
Test case
MultiSelectionBox-replace-items1.ycp (text/plain), 1.38 KB, created by
Stefan Hundhammer
on 2007-08-03 10:37:28 UTC
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Stefan Hundhammer
Created:
2007-08-03 10:37:28 UTC
Size:
1.38 KB
patch
obsolete
>// Example showing how to replace SelectionBox items >{ > > list all_toppings = > [ > "Cheese", > "Ham", > "Mushrooms", > "Pepperoni", > "Rucola", > "Salami", > "Tomatoes", > "Tuna" > ]; > > list veggie_toppings = > [ > "Cheese", > "Mushrooms (you might want to consult somebody who knows which ones are toxic)", > "Pepperoni", > "Rucola", > "Tomatoes" > ]; > > UI::OpenDialog(`HBox(`VSpacing(15), // layout trick: force minimum height > `VBox( > `HSpacing(120), // force minimum width > `MultiSelectionBox(`id(`toppings), "Toppings:", all_toppings ), > `Left( `CheckBox(`id(`veggie), `opt(`notify), "&Vegetarian" ) ), > `PushButton(`id(`ok), "&OK" ) > ) > ) > ); > > symbol button = nil; > > do > { > button = (symbol) UI::UserInput(); > > if ( button == `veggie ) > { > boolean vegetarian = (boolean) UI::QueryWidget(`veggie, `Value ); > > if ( vegetarian ) UI::ChangeWidget(`toppings, `Items, veggie_toppings ); > else UI::ChangeWidget(`toppings, `Items, all_toppings ); > } > > } while ( button != `ok ); > > list<string> order = (list<string>) UI::QueryWidget(`toppings, `SelectedItems ); > UI::CloseDialog(); > > > // > // Show the result > // > > > UI::OpenDialog(`VBox( > `Label( sformat( "Your order: %1", mergestring( order, ", " ) ) ), > `PushButton(`opt(`default), "&OK" ) > ) > ); > UI::UserInput(); > UI::CloseDialog(); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 295485
:
153769
|
155198
|
155199
|
155205
|
155206
| 155433