YaST2 Developers Documentation: YCP UI Reference: Widgets



YCP UI Widget Reference

Back to the widget index

Frame Frame with label

Description

This widget draws a frame around its child and displays a title label within the top left edge of that frame. It is used to visually group widgets together. It is very common to use a frame like this around radio button groups.

See the Layout HOWTO for details.

Arguments

string label title to be displayed on the top left edge
term child the contained child widget

Special Properties

string Value the label text

Sample Usage

`Frame( `RadioButtonGroup( `id( rb ), `VBox( ... ) ) );

Examples

Example 1: Frame1.ycp

{
    UI::OpenDialog(
	       `VBox(
		     `Frame ( "Important",
			      `Label("Hello, World!")
			      ),
		     `PushButton("&OK")
		     )
	       );
    UI::UserInput();
    UI::CloseDialog();
}
		

Example 2: Frame2.ycp

{
    UI::OpenDialog( `VBox(
		      `Frame ( "CPU &Speed",
			       `RadioButtonGroup(
						 `VBox(
						       `Left(`RadioButton("Normal"	)),
						       `Left(`RadioButton("Overclocked"	)),
						       `Left(`RadioButton("Red Hot"	)),
						       `Left(`RadioButton("Melting", true ))
						       )
						 )
			       ),
		      `PushButton("&OK")
		      )
		);
    UI::UserInput();
    UI::CloseDialog();
}
		

Example 3: TextEntry5.ycp


{
    UI::OpenDialog(
	       `VBox(
		     `Frame("Shrinkable Textentries",
			    `HBox(
				  `TextEntry(`opt(`shrinkable), "1"),
				  `TextEntry(`opt(`shrinkable), "2"),
				  `TextEntry(`opt(`shrinkable), "3"),
				  `TextEntry(`opt(`shrinkable), "4")
				  )
			    ),
		     `PushButton(`opt(`default), "&OK" )
		     )
	       );
    UI::UserInput();
    UI::CloseDialog();
}
		

Back to the widget index


YaST2 Developers Documentation: YCP UI Reference: Widgets

Generated Fri May 21 12:39:01 2004