actually what I want to do is make the pushbutton bigger when the different translation is picked from my language menu
I am a little confused on the stuff you gave below
On Aug 16, 2006, at 10:35 PM, [EMAIL PROTECTED] wrote:

Is it possible to make it so that the button's size changes when the width of the text that is in it changes?

For example I have a combobox with text in it and the text when selected changes what the text in the button is

Yes.

First, determine the width of the text...

  Dim p As New Picture(1, 1, 32)
  Dim g As Graphics = p.Graphics

  g.TextFont = whatever your font is
  g.TextSize = whatever your font size is

  your text width in pixels = g.StringWidth("whatever your text is")


Then, you have to tack on some extra to take into account the width of the sides of the control. I haven't tried a combo box, but I would guess add 15 pixels (you may have to experiment with that).


HTH
Andrew Keller
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to