コード例 #1
0
        /// <summary>
        /// Creates a label and adds it to the sizer.
        /// </summary>
        /// <param name="s">String of text to be displayed on the label</param>
        /// <param name="proportion">
        /// Proportion... thing.  Used to calculate how much of
        /// the available space ought to be absorbed by the control.
        /// If 0, the control will not be resized.
        /// </param>
        /// <param name="flags"><see cref="SizerFlags"/></param>
        /// <returns>Self reference</returns>
        public BoxSizer Add(string s, int proportion, SizerFlags flags)
        {
            Label l = new Label();

            l.Text = s;
            return(Add(l, proportion, flags));
        }
コード例 #2
0
        /// <summary>
        /// Creates a label and adds it to the sizer.
        /// </summary>
        /// <param name="c">Control to add</param>
        /// <param name="proportion">
        /// Proportion... thing.  Used to calculate how much of
        /// the available space ought to be absorbed by the control.
        /// If 0, the control will not be resized.
        /// </param>
        /// <param name="flags"><see cref="SizerFlags"/></param>
        /// <returns>Self reference</returns>
        public BoxSizer Add(Control c, int proportion, SizerFlags flags)
        {
            Controls.Add(c);

            Pair p = (Pair)proportions[proportions.Count - 1];

            // tweak p so that things are right
            p.proportion = proportion;
            p.flags      = flags;

            return(this);
        }
コード例 #3
0
 /// <summary>
 /// Creates a label and adds it to the sizer.
 /// </summary>
 /// <param name="s">String of text to be displayed on the label</param>
 /// <param name="flags"><see cref="SizerFlags"/></param>
 /// <returns>Self reference</returns>
 public BoxSizer Add(string s, SizerFlags flags)
 {
     return(Add(s, 0, flags));
 }
コード例 #4
0
 public Pair(Control c, int p, SizerFlags f)
 {
     control    = c;
     proportion = p;
     flags      = f;
 }
コード例 #5
0
 /// <summary>
 /// Creates a label and adds it to the sizer.
 /// </summary>
 /// <param name="c">Control to add</param>
 /// <param name="proportion">
 /// Proportion... thing.  Used to calculate how much of
 /// the available space ought to be absorbed by the control.
 /// If 0, the control will not be resized.
 /// </param>
 /// <param name="flags"><see cref="SizerFlags"/></param>
 /// <returns>Self reference</returns>
 public BoxSizer Add(Control c, SizerFlags flags)
 {
     return(Add(c, 0, flags));
 }