I am trying to have a button on my C# windows form with a name “Click Me”
It looks like the button text accepts only the words before the space and ignores the rest.
Having:
this.button_ClickMe.Text = “Click Me”;
Displays my button with text “Click” only.
Any idea why? and is there a work-around??
- Ivar
I suspect the button is just too small. Make it bigger, or make set
AutoSize = true(and place it within a container which has enough space, obviously).Here’s an example which works fine for me:
(Admittedly this sample works even with
AutoSize = false, so I suspect you’ve hard-coded the size somewhere… or your font is bigger. With longer text, it only works withAutoSize = trueor a manually specified size.)