RadTexBox sizing

11 posts, 0 answers
  1. Steven
    Steven avatar
    28 posts
    Member since:
    May 2007

    Posted 09 Jun 2007 Link to this post

    Okay folks you got me confused on this one.

    I gather that the height setting of the RadTextBox is based on the font size being used within the textbox. The problem is that the text is too close to the bottom edge of the textbox. The spacing between the top edge of the textbox and the actual text is fine but the bottom edge of the textbox does not have the same spacing.

    this would be okay - sorta - if you could manually adjust the height of the textbox but I have note been able to find where this can be done. I have tried setting the height size from wothin the RootElement tree (Size) and from the standard Size setting but thet both automatically reset to the intial height size set when the control is placed or the font size is changed.

    Steven Hodson
    WinExtra / Hodson Report
    http://www.winextra.com
    http://www.hodsonreport.com
  2. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 11 Jun 2007 Link to this post

    Indeed the height of the RadTextBox cannot be changed and this is by design (MS textbox has the same behavior). The height changes only proportionally to the font size. Do you think that we need to consider changing this behavior? It will be a trivial feature which we can add for the next minor version.

    As to the problem with the location of the text, indeed, we were able to confirm it. It appears when the font size is set to certain values. It is in our TODO list and it'll be fixed for the Q2 2007 release. Your points have been updated for the report.

    Let us know if you find anything else - we will be glad to review it for you.
     

    Sincerely yours,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    28 posts
    Member since:
    May 2007

    Posted 11 Jun 2007 Link to this post

    I realized the silliness of my thought on the textbox height after posting - sorry about that - I realize that the height is suppose to be tied to the font size.

    However the problem that sparked the post is the one you plan on addressing so all is good :)

    Steven Hodson
    WinExtra / Hodson Report
    http://www.winextra.com
    http://www.hodsonreport.com
  5. Sergio
    Sergio avatar
    2 posts
    Member since:
    Aug 2007

    Posted 08 Aug 2007 Link to this post

    Georgi,

    I'm having a similar problem.  But it has to do with the amount of padding that the TextBox contains.  The control is functioning as if you had set Borders = None on a standard WinForms control.

    I would like it function more like a standard TextBox with the extra padding between the text and the border.  (It can auto-adjust its height based on the font size, but the padding should still be there).

    Sergio
  6. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 09 Aug 2007 Link to this post

    Hi Sergio,

    To set the padding between the text and the border you could use the Padding property of the control or the RadTextBoxElement (this functionality is available from the Q1 2007 SP2 release). You could set it to the desired value either at design-time or directly by code or when implementing a custom theme.

    If you have any additional questions, please don't hesitate to ask us.
     

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Sergio
    Sergio avatar
    2 posts
    Member since:
    Aug 2007

    Posted 09 Aug 2007 Link to this post

    Georgi,

    Ok.  Here's the further problem: I turned on the 4 borders option, because my client just wants a bottom border.  When I increase the padding, there is some separation between the entry area and the border.  Is there a way to make that white, or just increase the padding within the entry area (which should increase the space between the text and the internal edges of the entry rectangle)?

    Secondly, I was trying to do this all with a theme.  So an additional question I have is that I saw where I can adjust the theme on a mouseover, can I adjust the theme when the control has focus? 

    And finally, how can I get the theme creator dialog box to more accurately represent what's happening?  It doesn't quite show the correct style when they are set.  Also, if I make a change to a theme, it doesn't automatically reflect in the UI.  I have to close the form designer and reopen it.

    Thanks,
      Sergio
  8. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 10 Aug 2007 Link to this post

    Hello Sergio,

    Thank you for contacting us.

    As to the first problem, the area that appears between the text and the border is in fact the fill primitive that is behind the entry area. This primitive takes the whole area between the borders (in our examples, you could use RadControlSpy to explore the structure of the textbox). You can change its color as you like in the theme or by code. 

    As to the second question, using Visual Style Builder you have to locate the RadTextBoxItem in the hierarchy and add a new state to it. Then create a condition with property set to RadElement.IsFocused property and Value set to true.

    As it comes to the Visual Style Builder, can you please elaborate a bit more on what exactly you find inaccurate when editing a theme? The preview part of the VSB shows the corresponding control in the same way as it will appear on the form (with all states applied). The design pane shows the selected element as it would appear in the selected "state" only. For more information on the Visual Style Builder I will recommend the two WinForms videos here and Build Great User Interfaces with the VisualStyleBuilder for Telerik Windows Forms whitepaper.

    The last problem you mention appears because Visual Style Builder does not refresh the theme that has been loaded in the memory of the Visual Studio designer when you save the theme. We will consider adding this functionality for the next major update. 

    Let us know if you have other questions.
     
     

    Best wishes,

    Georgi

    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  9. kerstin
    kerstin avatar
    7 posts
    Member since:
    Nov 2006

    Posted 25 Oct 2007 Link to this post

    I am using the Q2 2007 build of the Winforms Build and i am still not able to set the height how i would like to have it -whether manually nor through code? Is there a workaround?
  10. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 29 Oct 2007 Link to this post

    Hello Kerstin,

    Thank you for writing.

    The RadComboBox has almost the same layout behavior as the standard MS combobox. By default, the height of the RadComboBox cannot be changed. Instead, it is tied to the font size so when it changes the height changes accordingly. However, you can use its Padding property to set a different height. 

    On the other hand, if the Multiline property of the RadComboBox is set to true, you can change its height either at design-time or at runtime (through the code). 

    Please don't hesitate to write us if you have any additional questions.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. kerstin
    kerstin avatar
    7 posts
    Member since:
    Nov 2006

    Posted 30 Oct 2007 Link to this post

    So when can we expect to have the ability to set a height in the RADTEXTBOX?
  12. Angel
    Admin
    Angel avatar
    121 posts

    Posted 01 Nov 2007 Link to this post

    Hi Kerstin,

    You currently have the ability to set the height of the RadTextBox. When the RadTextBox is in single line mode, the height of the text area is calculated dynamically. The only way to increase the height of the RadTextBox is to increase the Padding values. The height of the entire RadTextBox equals the height of the text area, plus top and bottom paddings.

    For additional information, refer to this KB article:

    http://www.telerik.com/support/kb/article/b454K-meh-b454T-ckt-b454c-ckt.aspx

    If you have further questions, don't hesitate to contact us.

    Kind regards,
    Angel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for WinForms is Visual Studio 2017 Ready