in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Auto-Sizing Buttons

Last post 8/19/2008 1:48 PM by Adrian Cox_2. 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 8/19/2008 5:29 AM

    Auto-Sizing Buttons

    I've just started adding the LayoutControl to an existing project, to see if it will help us internationalize. I'm hoping that the LayoutControl will automate enough of the layout process that the translator can work on a text file, without having to manually adjust form sizes.

    I'm trying to create a button control (either SimpleButton or standard Button) within the layout with the following properties:

    1. The button by default is large enough to fit the text. The text in Swedish will probably be 50% longer than the text in English.
    2. When the form shrinks, some of the button text remains visible.
    3. When the form grows, the button will not grow significantly larger than the text.

    I can do #2 by setting a MinSize in the LayoutControlItem, but I'm having problems with #1 and #3. I can control the maximum size of the button using the MaxSize in the LayoutControlItem, but the MaxSize is different for each language, and I don't know it until the translator has written the text. Any suggestions?

  • 8/19/2008 12:54 PM In reply to

    • Pavel
    • Top 500 Contributor
    • Joined on 7/5/2007
    • Posts 46

    Re: Auto-Sizing Buttons

    I think, DX SimpleButton has this behaviour by default.

    By the way, you can enable autosize in the LayoutControl for any XtraEditor by setting the editor.AutosizeInLayoutControl property to true.

    WPF HATER BLOG
    http://wpfhater.blogspot.com/
  • 8/19/2008 1:48 PM In reply to

    Re: Auto-Sizing Buttons

    Pavel:

    I think, DX SimpleButton has this behaviour by default.

    It wasn't working by default in my application, but I found an example in the XtraLayout documentation of a button which inherits from SimpleButton and has the behaviour I want.

    Pavel:

    By the way, you can enable autosize in the LayoutControl for any XtraEditor by setting the editor.AutosizeInLayoutControl property to true.

    That's useful, and I didn't spot it in the documentation.

Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED