Author: sh-sh-sh Date: Tue Apr 1 18:14:24 2008 New Revision: 45939 URL: http://svn.opensuse.org/viewcvs/yast?rev=45939&view=rev Log: added HelpText property Modified: trunk/ycp-ui-bindings/examples/Events.ycp Modified: trunk/ycp-ui-bindings/examples/Events.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/Events.y... ============================================================================== --- trunk/ycp-ui-bindings/examples/Events.ycp (original) +++ trunk/ycp-ui-bindings/examples/Events.ycp Tue Apr 1 18:14:24 2008 @@ -118,7 +118,7 @@ `HWeight( 1, pizza ), `HWeight( 1, toppings ), `HWeight( 1, drink ), - `HWeight( 1, `RichText(`id(`help), help_text ) ) + `HWeight( 1, `RichText(`id(`help_text), help_text ) ) ); term buttons = `HBox( @@ -176,7 +176,7 @@ UI::OpenDialog(`opt(`defaultsize), - `VBox( + `VBox(`id(`mainLayout), `Heading( "Event Example" ), `Label( howto ), `VSpacing(), @@ -200,10 +200,16 @@ `VWeight( 1, `RichText(`id(`event_display), event_display ) ), - `Right( `PushButton(`id(`close), "C&lose" ) ) + `HBox( + `PushButton(`id(`help), "&Help" ), + `HStretch(), + `PushButton(`id(`close), "C&lose" ) + ) ) ); + UI::ChangeWidget(`mainLayout, `HelpText, howto ); + // // Event loop // @@ -247,6 +253,13 @@ UI::ChangeWidget(`send_mafioso, `Value, nil ); UI::DumpWidgetTree(); } + else if ( event["ID"]:nil == `help ) + { + UI::OpenDialog(`VBox(`MinSize( 35, 7, `RichText( howto ) ), + `PushButton("&OK" ) ) ); + UI::UserInput(); + UI::CloseDialog(); + } else if ( event["ID"]:nil == `cancel_order ) { y2milestone( "Cancelling order" ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org