PDA

Click to See Complete Forum and Search --> : Command Button Caption


badgers
Nov 15th, 1999, 10:06 PM
Can a command button caption have multiple lines?
I am trying to read in a text file or a rich text file at run time and assign the text to a text box and a command button. If the user clicks the text box its visible property becomes false and the command button becomes visible.(these two items cover the exact same space) This is giving me a selected unselected state. The command button has a different look then the rich text box. I would like to be able for them both to have the same text. Is this possible? I do not need rich text I just used the rich text box to start with.
thank you for your time and have a good day

Geoff Gunson
Nov 15th, 1999, 10:15 PM
Hi

I am not quite shure what you want but heres what you can do:

Command1.Caption = "line 1" & vbCrLf & "line 2"

Also by the way the Microsoft RichText control supports loading a file directly into the control. IE richtextbox1.LoadFile "myfile.txt".

Geoff

Inhumanoid
Nov 15th, 1999, 10:30 PM
It is possible to have multiple lines on a command button:



Command1.Caption = "line" & vbCrLf & "another line"

Serge
Nov 15th, 1999, 10:44 PM
Just assign the Text property of the RichTextBox to the Caption of the command button.


Command1.Caption = RichText1.Text

Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)

badgers
Nov 15th, 1999, 10:47 PM
:D Damn! you people are fast!!
thank you for your help :)

------------------
I am so skeptacle, I can hardly believe it!

c@lle
Nov 16th, 1999, 02:50 PM
You can use the 'toggle button' from
component 'Microsoft Forms 2.0 Object Library'

HTH

Nov 16th, 1999, 05:46 PM
Instead of a toggle button you can use an option/chackbox with its style set to graphical.