Results 1 to 5 of 5

Thread: Toolbar with placeholder buttons

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Posts
    17
    I want to create a toolbar ( using the toolbar control in VB 6.0) and place two text boxes for user input on the toolbar. I also want to display caption for these text boxes. These two text boxes appear side by side between some toolbar buttons. Can anyone provide the code?


  2. #2
    Guest
    You can just add buttons with types vbPlaceholder. You can then put the TXBoxes on top. Is that your question or have I misunderstood?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Posts
    17
    thanks for the answer, but i think i didn't word my question correctly. I want to do the task at run time(which means through code). Also even though i set the ".Caption" property for the place holder button the Caption is not displayed.

  4. #4
    Guest
    If you want to do that...hold on, let me get VB on-line...

    Code:
    Private Sub Form_Load()
        tb.Buttons.Add [Index], [Key], "See *", 4, 0
    End Sub
    You should add the KEY and possibly Index, depending on your case.

    Now, as for captions...

    You cannot add captions to a separator, right? The same goes for a placeholder, but there's a very simple way...use a label in place of it. Draw a label in front of the placeholder. & chr(0)

    Got it?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Posts
    17
    Thanks,
    I'd figured out as much as u have suggested but i was just hoping there's a better way of doing it!!
    At least i know now that i was on the right track!

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