multiline toolbarbuttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In vb.net, visual basic, I have created a toolbar with several buttons on a
windows form. The text for the buttons is too long, so I would like to make
it appear on 2 lines. How do I do this?
 
Hi,

To make the toolbar to appear in 2 lines incase the toolbar becomes too
small to display all the buttons on the same line,
you need to use the Wrappable property of the toolbar.
Set it true if the toolbar buttons wrap to another line otherwise, false.
The default value is true.

toolBar1.Wrappable = True

You can refer to the following article for more details
[ToolBar.Wrappable Property]
http://msdn.microsoft.com/library/d...temwindowsformstoolbarclasswrappabletopic.asp

HTH

Mona
 
No, the toolbar is not too small, one of my buttons has a long description,
so I want that description on one button to appear in 2 lines.

Mona(Grapecity) said:
Hi,

To make the toolbar to appear in 2 lines incase the toolbar becomes too
small to display all the buttons on the same line,
you need to use the Wrappable property of the toolbar.
Set it true if the toolbar buttons wrap to another line otherwise, false.
The default value is true.

toolBar1.Wrappable = True

You can refer to the following article for more details
[ToolBar.Wrappable Property]
http://msdn.microsoft.com/library/d...temwindowsformstoolbarclasswrappabletopic.asp

HTH

Mona

xctyski said:
In vb.net, visual basic, I have created a toolbar with several buttons on a
windows form. The text for the buttons is too long, so I would like to make
it appear on 2 lines. How do I do this?
 
Hi,

To make the text of the button wrap into two lines, you can use the line
feed character.

Following is an illustration for the same

this.button1 = new System.Windows.Forms.Button();
.....
this.button1.Text = "Line 1\nLine 2";

HTH

Mona


xctyski said:
No, the toolbar is not too small, one of my buttons has a long description,
so I want that description on one button to appear in 2 lines.

Mona(Grapecity) said:
Hi,

To make the toolbar to appear in 2 lines incase the toolbar becomes too
small to display all the buttons on the same line,
you need to use the Wrappable property of the toolbar.
Set it true if the toolbar buttons wrap to another line otherwise, false.
The default value is true.

toolBar1.Wrappable = True

You can refer to the following article for more details
[ToolBar.Wrappable Property]
http://msdn.microsoft.com/library/d...temwindowsformstoolbarclasswrappabletopic.asp

HTH

Mona

xctyski said:
In vb.net, visual basic, I have created a toolbar with several buttons
on
a
windows form. The text for the buttons is too long, so I would like
to
make
it appear on 2 lines. How do I do this?
 
No, I'm sorry it did not work. This is a toolbarbutton and not a regular
button and I am using visual basic under vb.net. I tried:
me.toolbarselprint.text = "Select\nPrint" and it showed up as
Select\nPrint. Then I tried me.toolbarselprint.text = "Select" &
environment.newline & "Print" and it showed with it still on one line but
with two squares between Select and Print.
I appreciate your patience, can you help me further with this problem?

Mona(Grapecity) said:
Hi,

To make the text of the button wrap into two lines, you can use the line
feed character.

Following is an illustration for the same

this.button1 = new System.Windows.Forms.Button();
.....
this.button1.Text = "Line 1\nLine 2";

HTH

Mona


xctyski said:
No, the toolbar is not too small, one of my buttons has a long description,
so I want that description on one button to appear in 2 lines.

Mona(Grapecity) said:
Hi,

To make the toolbar to appear in 2 lines incase the toolbar becomes too
small to display all the buttons on the same line,
you need to use the Wrappable property of the toolbar.
Set it true if the toolbar buttons wrap to another line otherwise, false.
The default value is true.

toolBar1.Wrappable = True

You can refer to the following article for more details
[ToolBar.Wrappable Property]
http://msdn.microsoft.com/library/d...temwindowsformstoolbarclasswrappabletopic.asp

HTH

Mona

In vb.net, visual basic, I have created a toolbar with several buttons on
a
windows form. The text for the buttons is too long, so I would like to
make
it appear on 2 lines. How do I do this?
 
Back
Top