Results 1 to 9 of 9

Thread: [vbRichClient] - How to create tabs ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2014
    Posts
    17

    Question [vbRichClient] - How to create tabs ?

    Hi,

    I would like to avoid to use the tabstrip control or the bugged SStabs. So I was looking for a code example of tabs with vbRichClient and I don't find exactly what I looking for.

    I'm about to use the vbRichClient Toolbar demo like tabs. Is it a good idea or there is something more adapted ?


    Thank you.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Dec 2014
    Posts
    17

    Re: [vbRichClient] - How to create tabs ?

    OK, I've modified Olaf's example "MenuAndToolbarDemo" to have tabs : MenuAndToolbarDemo_tabs.zip

    I've got 2 questions about it : (edit : resolved below, thanks jpbro!)

    • How can I make to check the the first tab in form load ?
      I could make something like that :

      Code:
      Dim ToolBarItem As cwToolBarItem
          For Each ToolBarItem In ToolBar.Widgets
              ToolBarItem.Checked = True
              Exit For
          Next
      Not really elegant... I would prefer something like that :
      Code:
      ToolBar.Widgets.Item(0).Checked = True
      But it dosen't work ....

    • How can I display the toolbar on the top of my frame ?
      If I put my frame too high, the toolbar is behind the frame...


    Thank you.
    Last edited by schmurtz; Jun 21st, 2015 at 03:16 PM.

  3. #3
    Hyperactive Member
    Join Date
    Jul 2013
    Posts
    400

    Re: [vbRichClient] - How to create tabs ?

    Widgets.Item(n) is one based, but Widget.Key may also be used, like in Widgets.Item("File").
    I can't answer the second question as I don't know VB enough, sorry.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [vbRichClient] - How to create tabs ?

    Is this one of those "created for asking fake prompting questions" IDs we've been reading about?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2014
    Posts
    17

    Re: [vbRichClient] - How to create tabs ?

    Quote Originally Posted by dilettante View Post
    Is this one of those "created for asking fake prompting questions" IDs we've been reading about?
    Sorry I don't understand... Can you be more explicit ? What's the problem with my questions ?

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [vbRichClient] - How to create tabs ?

    Not a thing.

    However it is unlikely anyone here can help much. Have you tried his support site?

  7. #7
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,451

    Re: [vbRichClient] - How to create tabs ?

    Don't listen to Dilettante on matters re:RC5 - he's made up his mind about it's usefulness, and for reason known only to himself, he's taken to trolling whenever it's mentioned here. So while he's often worth listening to on other programming topics re: VB, he's just noise on RC5 stuff.

    Regarding your first question, Carlos is right - you can use the 1 based index of the toolbar item to select it as follows:

    Code:
    ToolBar.Widgets.Item(1).Checked = True
    Regarding your second question, you can move your frames to the background after you've created your RC5 widgets on Form_Load by calling the ZOrder method. E.g. (near the bottom of the Form_Load event):

    Code:
    Me.frame_tab(0).ZOrder 1
    But I think you're best off positioning your forms where they need to be in the Form_Resize event rather than have them appear behind the toolbar.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Dec 2014
    Posts
    17

    Re: [vbRichClient] - How to create tabs ?

    Quote Originally Posted by dilettante View Post
    However it is unlikely anyone here can help much.
    Olaf and others already help a lot on many questions and more than I can expect. For example Olaf creates extraordinary examples for helping to use some very powerful features of RC5.


    Thanks jpbro !
    I was trying to use the 0 based index of the toolbar... It starts at 1
    ZOrder, obvious ! I was thinking that the RC5 toolbar was like an additionnal form positionned on the top of my main form, I have never thought it would work with ZOrder.

  9. #9
    Lively Member
    Join Date
    Oct 2014
    Posts
    93

    Re: [vbRichClient] - How to create tabs ?

    1. How the form is displayed on the tab
    2. How close one or several tabs, like IE browsers

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