Exemple #1
0
 // public wiwButton(wx.Window _pc, wx.Sizer _ps, string _label, Point _pos, Size _sz, uint _style)
 // 	: base(_pc, _label, _pos, _sz, _style)
 public wiwTextEdit(wx.Window _pc, wx.Sizer _ps)
     : base(_pc, wx.Panel.wxDefaultPosition, wx.Panel.wxDefaultSize, wx.Panel.wxDEFAULT_FRAME_STYLE)
 {
     _props = new wdbTextEditProps();
     _text_cur_index++;
     _p_sizer = _ps;
     _sizer_item = null;
     // set sub item
     // sizer flexgrid
     _sub_sizer = new wx.FlexGridSizer(1, 2, 0, 0);
     _sub_sizer.AddGrowableCol(1);
     _sub_label = new wx.StaticText(this, -1, "TextEdit");
     _sub_text = new wx.TextCtrl(this, -1, "");
     _sub_sizer.Add(_sub_label, 0, wx.Alignment.wxALIGN_CENTER_VERTICAL|
                    wx.Direction.wxLEFT|wx.Direction.wxBOTTOM|wx.Direction.wxTOP, _props.BorderWidth);
     _sub_sizer.Add(_sub_text, 0, wx.Alignment.wxALIGN_CENTER_VERTICAL|wx.Stretch.wxEXPAND|
                    wx.Direction.wxTOP|wx.Direction.wxBOTTOM|wx.Direction.wxRIGHT, _props.BorderWidth);
     this.SetSizerAndFit(_sub_sizer, false);
     this.AutoLayout = true;
     this.Layout();
     string name = "TextEdit" + _text_cur_index.ToString();
     SetDefaultProps(name);
     SetWidgetProps();
 }
Exemple #2
0
        protected void DoLayout()
        {
            wx.BoxSizer topSizer = new wx.BoxSizer (wx.Orientation.wxVERTICAL);
            {
                wx.BoxSizer boxSizer = new wx.BoxSizer (wx.Orientation.wxVERTICAL);
                {
                    wx.StaticBoxSizer dataSizer = new wx.StaticBoxSizer (new wx.StaticBox (this, "Dane"), wx.Orientation.wxHORIZONTAL);
                    {
                        wx.FlexGridSizer gridSizer = new wx.FlexGridSizer (2, 2, 5, 10);
                        {
                            gridSizer.Add (documentsTC, 0, wx.SizerFlag.wxEXPAND);
                            gridSizer.Add (documentsBtn, 0, wx.SizerFlag.wxNo_FLAG);
                            gridSizer.Add (termsTC, 0, wx.SizerFlag.wxEXPAND);
                            gridSizer.Add (termsBtn, 0, wx.SizerFlag.wxEXPAND);

                        }
                        gridSizer.AddGrowableCol (0);
                        dataSizer.Add (gridSizer, 1, wx.SizerFlag.wxALL | wx.SizerFlag.wxEXPAND, 5);
                    }
                    boxSizer.Add (dataSizer, 0, wx.SizerFlag.wxEXPAND);

                    boxSizer.Add (20, 5, 0, wx.SizerFlag.wxEXPAND, 0);

                    wx.StaticBoxSizer searchSizer = new wx.StaticBoxSizer (new wx.StaticBox (this, "Wyszukiwanie"), wx.Orientation.wxVERTICAL);
                    {
                        wx.BoxSizer inputSizer = new wx.BoxSizer (wx.Orientation.wxHORIZONTAL);
                        {
                            inputSizer.Add (searchTC, 1, wx.SizerFlag.wxEXPAND);
                            inputSizer.Add (10, 20, 0, wx.SizerFlag.wxEXPAND, 0);
                            inputSizer.Add (searchBtn, 0, wx.SizerFlag.wxNo_FLAG);
                        }
                        searchSizer.Add (inputSizer, 0, wx.SizerFlag.wxALL | wx.SizerFlag.wxEXPAND, 5);

                        searchSizer.Add (resultsLC, 1, wx.SizerFlag.wxEXPAND | wx.SizerFlag.wxALL, 5);
                    }
                    boxSizer.Add (searchSizer, 1, wx.SizerFlag.wxEXPAND);

                }
                topSizer.Add (boxSizer, 1, wx.SizerFlag.wxALL | wx.SizerFlag.wxEXPAND, 5);
            }
            topSizer.SetSizeHints (this);
            this.SetSizer (topSizer);
        }