Results 1 to 7 of 7

Thread: Command Button Caption

  1. #1

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    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

  2. #2
    Addicted Member Geoff Gunson's Avatar
    Join Date
    Jun 1999
    Posts
    241

    Post

    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

  3. #3
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    It is possible to have multiple lines on a command button:

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

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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


  5. #5

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    Damn! you people are fast!!
    thank you for your help

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

  6. #6
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179

    Post

    You can use the 'toggle button' from
    component 'Microsoft Forms 2.0 Object Library'

    HTH

  7. #7
    Guest

    Post

    Instead of a toggle button you can use an option/chackbox with its style set to graphical.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width