本文整理汇总了C#中Window.SetSizer方法的典型用法代码示例。如果您正苦于以下问题:C# Window.SetSizer方法的具体用法?C# Window.SetSizer怎么用?C# Window.SetSizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Window
的用法示例。
在下文中一共展示了Window.SetSizer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MyDialogFunc
public static Sizer MyDialogFunc( Window parent, bool call_fit, bool set_sizer )
{
BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL );
StaticBox item2 = new StaticBox( parent, -1, "Copyright" );
item2.Font = new wx.Font( 16, wx.FontFamily.wxROMAN, wx.FontStyle.wxNORMAL, wx.FontWeight.wxNORMAL );
StaticBoxSizer item1 = new StaticBoxSizer( item2, Orientation.wxVERTICAL );
StaticText item3 = new StaticText( parent, ID_TEXT, "Copyright 2002 T. Coon. 1000,- ¤.", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item3.ForegroundColour = Colour.wxBLUE;
item3.Font = new wx.Font( 16, wx.FontFamily.wxROMAN, wx.FontStyle.wxNORMAL, wx.FontWeight.wxNORMAL );
item1.Add( item3, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
item0.Add( item1, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
StaticLine item4 = new StaticLine( parent, ID_LINE, Window.wxDefaultPosition, new Size(20,-1), StaticLine.wxLI_HORIZONTAL );
item0.Add( item4, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
Button item5 = new Button( parent, Window.wxID_OK, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item0.Add( item5, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
if (set_sizer)
{
parent.SetSizer( item0 );
if (call_fit)
item0.SetSizeHints( parent );
}
return item0;
}
示例2: MyDialogFunc
public static Sizer MyDialogFunc( Window parent, bool call_fit, bool set_sizer )
{
BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL );
StaticBox item2 = new StaticBox( parent, -1, "Controls will remember their values" );
StaticBoxSizer item1 = new StaticBoxSizer( item2, Orientation.wxVERTICAL );
FlexGridSizer item3 = new FlexGridSizer( 0, 2, 0, 0 );
item3.AddGrowableCol( 0 );
item3.AddGrowableCol( 1 );
StaticText item4 = new StaticText( parent, ID_TEXT, "wxSpinCtrl:", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item4.Name = "TestName";
item3.Add( item4, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
SpinCtrl item5 = new SpinCtrl( parent, ID_MY_NUMBER, "0", Window.wxDefaultPosition, new Size(130,-1), SpinCtrl.wxSP_ARROW_KEYS|SpinCtrl.wxSP_WRAP, 0, 100, 0 );
item3.Add( item5, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
StaticText item6 = new StaticText( parent, ID_TEXT, "wxTextCtrl:", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item3.Add( item6, 0, Alignment.wxALIGN_RIGHT|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
TextCtrl item7 = new TextCtrl( parent, ID_MY_TEXT, "", Window.wxDefaultPosition, new Size(130,-1), 0 );
item3.Add( item7, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
item1.Add( item3, 1, Stretch.wxGROW|Direction.wxALL, 5 );
item0.Add( item1, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
StaticLine item8 = new StaticLine( parent, ID_LINE, Window.wxDefaultPosition, new Size(300,-1), StaticLine.wxLI_HORIZONTAL );
item0.Add( item8, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
Button item9 = new Button( parent, Window.wxID_OK, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item0.Add( item9, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
if (set_sizer)
{
parent.SetSizer( item0 );
if (call_fit)
item0.SetSizeHints( parent );
}
return item0;
}
示例3: NotebookFunc
public static Sizer NotebookFunc( Window parent, bool call_fit, bool set_sizer )
{
BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL );
Notebook item2 = new Notebook( parent, ID_NOTEBOOK, Window.wxDefaultPosition, new Size(200,160), 0 );
NotebookSizer item1 = new NotebookSizer( item2 );
Panel item3 = new Panel( item2, -1 );
PageOneFunc( item3, false );
item2.AddPage( item3, "Page 1" );
Panel item4 = new Panel( item2, -1 );
PageTwoFunc( item4, false );
item2.AddPage( item4, "Page 2" );
Panel item5 = new Panel( item2, -1 );
item2.AddPage( item5, "Page 3" );
item0.Add( item1, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
StaticLine item6 = new StaticLine( parent, ID_LINE, Window.wxDefaultPosition, new Size(20,-1), StaticLine.wxLI_HORIZONTAL );
item0.Add( item6, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
BoxSizer item7 = new BoxSizer( Orientation.wxHORIZONTAL );
Button item8 = new Button( parent, Window.wxID_OK, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item8.SetDefault();
item7.Add( item8, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
Button item9 = new Button( parent, Window.wxID_CANCEL, "Cancel", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item7.Add( item9, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
item0.Add( item7, 0, Alignment.wxALIGN_CENTER|Direction.wxLEFT|Direction.wxRIGHT|Direction.wxBOTTOM, 5 );
if (set_sizer)
{
parent.SetSizer( item0 );
if (call_fit)
item0.SetSizeHints( parent );
}
return item0;
}
示例4: PageOneFunc
public static Sizer PageOneFunc( Window parent, bool call_fit, bool set_sizer )
{
BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL );
TextCtrl item1 = new TextCtrl( parent, ID_TEXTCTRL, "", Window.wxDefaultPosition, new Size(200,-1), 0 );
item0.Add( item1, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 20 );
TextCtrl item2 = new TextCtrl( parent, ID_TEXTCTRL, "", Window.wxDefaultPosition, new Size(200,90), TextCtrl.wxTE_MULTILINE );
item0.Add( item2, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 20 );
if (set_sizer)
{
parent.SetSizer( item0 );
if (call_fit)
item0.SetSizeHints( parent );
}
return item0;
}
示例5: PageTwoFunc
public static Sizer PageTwoFunc( Window parent, bool call_fit, bool set_sizer )
{
BoxSizer item0 = new BoxSizer( Orientation.wxVERTICAL );
StaticBox item2 = new StaticBox( parent, -1, "Checks" );
StaticBoxSizer item1 = new StaticBoxSizer( item2, Orientation.wxHORIZONTAL );
CheckBox item3 = new CheckBox( parent, ID_CHECKBOX, "Check", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item1.Add( item3, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
CheckBox item4 = new CheckBox( parent, ID_CHECKBOX, "Check", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item1.Add( item4, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
CheckBox item5 = new CheckBox( parent, ID_CHECKBOX, "Check", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item1.Add( item5, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
item0.Add( item1, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
StaticBox item7 = new StaticBox( parent, -1, "Buttons" );
StaticBoxSizer item6 = new StaticBoxSizer( item7, Orientation.wxVERTICAL );
Button item8 = new Button( parent, ID_BUTTON, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item6.Add( item8, 0, Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
Button item9 = new Button( parent, ID_BUTTON, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item6.Add( item9, 0, Alignment.wxALIGN_CENTER|Direction.wxALL, 5 );
Button item10 = new Button( parent, ID_BUTTON, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0 );
item6.Add( item10, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
item0.Add( item6, 0, Stretch.wxGROW|Alignment.wxALIGN_CENTER_VERTICAL|Direction.wxALL, 5 );
if (set_sizer)
{
parent.SetSizer( item0 );
if (call_fit)
item0.SetSizeHints( parent );
}
return item0;
}