YaST2 Developers Documentation: YCP UI Reference: Widgets



YCP UI Widget Reference

Back to the widget index

ReplacePoint Pseudo widget to replace parts of a dialog

Description

A ReplacePoint can be used to dynamically change parts of a dialog. It contains one widget. This widget can be replaced by another widget by calling ReplaceWidget( `id( id ), newchild ), where id is the the id of the new child widget of the replace point. The ReplacePoint widget itself has no further effect and no optical representation.

Arguments

term child the child widget

Special Properties

None

Sample Usage

`ReplacePoint( `id( `rp ), `Empty() )

Examples

Example 1: ReplacePoint1.ycp

{
    UI::OpenDialog(
	       `VBox(
		     `ReplacePoint(`id(`rp), `Label("This is a label")),
		     `PushButton(`id(`change), "Change")));
    UI::UserInput();
    UI::ReplaceWidget(`id(`rp), `PushButton("This is a PushButton"));
    UI::UserInput();
    UI::ReplaceWidget(`id(`rp), `CheckBox("This is a CheckBox"));
    UI::UserInput();
    UI::ReplaceWidget(`id(`rp), `HBox(`PushButton("Button1"), `PushButton("Button2")));
    UI::UserInput();
    UI::CloseDialog();
}
		

Back to the widget index


YaST2 Developers Documentation: YCP UI Reference: Widgets

Generated Fri May 21 12:39:01 2004