Tab Page Problem

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

Hey Group

Sorry but this is a Repost due to bad explination and title:

I have a Tool bar, with seven Icons on. When a users clicks on a Icon it
brings up one of seven tab pages with 2 to 7 tabs on each, and around 30
Controls per page.

All Tab Pages are hiden untill the toolbar Icon is selected the i run
tpgxxxx.Visible = True.

Problem is when I select tab order, it brings up the tab order propertys on
all my forms. I carn`t see whats whats On some tab Order properts I have
56.7.102.113

As i don`t really know how to explain it properly, i`ve posted my project in
a zip at www.forecourtsupport.co.uk/App.zip

Any body got any Ideas?

Many thanks
MCN
 
Hi MCN,

I did look to it, but do not understand your problem.

However, first do know that there is a well known bug with tabpages.
It reorders the tabpages and I have nowhere seen that it is really
controlable.
(Only with deleting and rebuilding the pages all the time)

I made once this little snippet for it, Tom Leylan did test it and made an
approvement to it.
With Tom this did work in a testing situation, but for Eric (Belgian) it did
not function. (However if that reordering is your problem, you can have a
look for it, for the idea behind it. I think when it will work for you than
you can better make for every icon an apart routine, which I did not
investigate for you how to do). I think it will be no nice coding.

But I hope it helps?

Cor

\\\for this the tabpage.names should be ordered alphabetical
Dim lambiek(Me.TabControl1.TabPages.Count - 1) As TabPage
Dim sidonia(Me.TabControl1.TabPages.Count - 1) As String
For i As Integer = TabControl1.TabPages.Count - 1 To 0 Step -1
lambiek(i) = TabControl1.TabPages(i)
sidonia(i) = TabControl1.TabPages.Item(i).name
Next
lambiek.Sort(sidonia, lambiek)
TabControl1.Tabpages.clear
For i As Integer = 0 To lambiek.Length - 1
TabControl1.TabPages.Add(lambiek(i))
Next
///
 
Why did u do it this way ? I mean why are using only a single form
with many tabcontrols placed on top of another ? You could have a
made an MDI form with the toolbar and made separate form for each of
the tabcontrol as MDI child forms. But if u prefer to keep it this
way, I would suggest moving each tab to a different temporary form
and setting tab order and then copying the form back, I dont know if
it would work, but its worth a try. But I strongly suggest u go for
the first option.
 
Pradeep C,

Many thanks for you post, what do you mean by a MDI child forms? Sorry im
fairly new to VB?

Could you explain or point me in the direction of a link for some reading?

Many Thanks
Si

Pradeep C said:
Why did u do it this way ? I mean why are using only a single form
with many tabcontrols placed on top of another ? You could have a
made an MDI form with the toolbar and made separate form for each of
the tabcontrol as MDI child forms. But if u prefer to keep it this
way, I would suggest moving each tab to a different temporary form
and setting tab order and then copying the form back, I dont know if
it would work, but its worth a try. But I strongly suggest u go for
the first option.
 
Make frmMainMenu form a MDI Container. (Set its IsMDIContainer
Property to TRUE). Create forms and cut-paste each Tab Control onto a
different form. On the click event of toolbar buttons, instead making
tab controls visible and hidden, open the form with requred tabcontol
and close it when not needed.

For eg. if you have Form1 which contains the tabcontrol you want to
display when you click a toolbar button,



Dim frmToDisplay as New Form1
frmToDisplay.MDIParent = Me 'the MainForm
frmToDisplay.WindowState = FormWindowState.Maximized
frmToDisplay.Show()



Check and see.
 
That worked a treat, Many Many thanks Pradeep C


MadCrazyNewbie said:
Pradeep C,

Many thanks for you post, what do you mean by a MDI child forms? Sorry im
fairly new to VB?

Could you explain or point me in the direction of a link for some reading?

Many Thanks
Si
 
Back
Top