Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

RadTextBoxControlElement is rendered too small in a GridLayout

$
0
0

   I have created a simple grid of labels and textboxes.
   It's working fine, but it's not looking good.
   The Textboxes are not rendered big enough to display the font in full height.
   What could be wrong ? Is the theme applied too late ? Why does the TextBox not inform the Layouter about it's minimum size ?
   
    A screenshot is attached, and the code is here:

this.layoutContainer = newGridLayout(2, 3);
 
          layoutContainer.Columns.Clear();
          layoutContainer.Rows.Clear();
          layoutContainer.Columns.Add(newGridLayoutColumn() { SizingType = GridLayoutSizingType.Auto });
          layoutContainer.Columns.Add(newGridLayoutColumn() { SizingType = GridLayoutSizingType.Auto });
          layoutContainer.Rows.Add(newGridLayoutRow() { SizingType = GridLayoutSizingType.Auto });
          layoutContainer.Rows.Add(newGridLayoutRow() { SizingType = GridLayoutSizingType.Auto });
          layoutContainer.Rows.Add(newGridLayoutRow() { SizingType = GridLayoutSizingType.Auto });
 
          //int num = (int)this.layoutContainer.BindProperty(RadElement.PaddingProperty, (RadObject)this, RadElement.PaddingProperty, PropertyBindingOptions.TwoWay);
          this.layoutContainer.StretchHorizontally = true;
          this.layoutContainer.StretchVertically = false;
          this.Children.Add((RadElement)this.layoutContainer);
 
          var lbl1 = newRadLabelElement();
          lbl1.Text = "Minimum";
          lbl1.SetValue(GridLayout.ColumnIndexProperty, (object)0);
          lbl1.SetValue(GridLayout.RowIndexProperty, (object)0);
          layoutContainer.Children.Add(lbl1);
 
          var lbl2 = newRadLabelElement();
          lbl2.Text = "Planwert";
          lbl2.SetValue(GridLayout.ColumnIndexProperty, (object)0);
          lbl2.SetValue(GridLayout.RowIndexProperty, (object)1);
          layoutContainer.Children.Add(lbl2);
 
          var lbl3 = newRadLabelElement();
          lbl3.Text = "Maximum";
          lbl3.SetValue(GridLayout.ColumnIndexProperty, (object)0);
          lbl3.SetValue(GridLayout.RowIndexProperty, (object)2);
          layoutContainer.Children.Add(lbl3);
 
          var num1 = newRadTextBoxControlElement();
          num1.StretchVertically = false;
          num1.SetValue(GridLayout.ColumnIndexProperty, (object)1);
          num1.SetValue(GridLayout.RowIndexProperty, (object)0);
          num1.SetValue(GridLayout.CellPaddingProperty, (object)newPadding(3));
          layoutContainer.Children.Add(num1);
 
          var num2 = newRadTextBoxControlElement();
          num2.StretchVertically = false;
          num2.SetValue(GridLayout.ColumnIndexProperty, (object)1);
          num2.SetValue(GridLayout.RowIndexProperty, (object)1);
          num2.SetValue(GridLayout.CellPaddingProperty, (object)newPadding(3));
          layoutContainer.Children.Add(num2);
 
          var num3 = newRadTextBoxControlElement();
          num3.SetValue(GridLayout.ColumnIndexProperty, (object)1);
          num3.SetValue(GridLayout.RowIndexProperty, (object)2);
          num3.StretchVertically = false;
          num3.SetValue(GridLayout.CellPaddingProperty, (object)newPadding(3));
          layoutContainer.Children.Add(num3);

Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>