Toolbar Problem

  • Thread starter Thread starter S Shulman
  • Start date Start date
S

S Shulman

Hi All

Using the TabSelected event of the Tab control the program hides and shows
buttons on the toolbar
But for some reason if I change tab A to B it works fine but if I change A
to C then all toolbar buttons are only very partially uncovered

Any suggestions?
Thank you,
Shmuel
 
S Shulman said:
Using the TabSelected event of the Tab control the program hides and shows
buttons on the toolbar
But for some reason if I change tab A to B it works fine but if I change A
to C then all toolbar buttons are only very partially uncovered

"Post your code!"
 
Initially all buttons are not visible

Shmuel



Private Sub ShowHideTB()

'hide all buttons

Dim TBB As ToolBarButton

For Each TBB In TB.Buttons

TBB.Visible = False

Next



Select Case TabMain.SelectedTab.Name

Case TabActions.Name

TBBActionGeneralNew.Visible = True

TBBActionAddFollowUp.Visible = True

TBBActionDelete.Visible = True

TBBActionDone.Visible = True

TBBActionSnooze.Visible = True

TBBActionViewEdit.Visible = True

Case TabClients.Name

TBBClientAddClient.Visible = True

TBBClientAddSite.Visible = True

TBBClientGoToSites.Visible = True

TBBClientViewEdit.Visible = True

Case TabSites.Name

TBBSiteAddSite.Visible = True

TBBSiteAddVisit.Visible = True

TBBSiteGoToVisits.Visible = True

TBBSiteViewEdit.Visible = True

End Select

End Sub
 
Shmuel,

Hmm, that's interesting. If I set this up with the form initializing to all
buttons hidden and then change the visibility to true I get just the top
portion of the buttons showing. If I run the same program with any toolbar
buttons visible when the form initializes, then everything works fine. I was
able to get it to work, even with the initial hidden states, by adding a
tb.height = 50, for example, to the ShowHideTB sub.

Dave
 
Thanks Dave

It works now when I set the height
I wonder why only in that case I need to set the height

Thanks again
Shmuel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top