PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Gary Stout on November 03, 2009, 10:03:20 PM

Title: Tab Control on a tab
Post by: Gary Stout on November 03, 2009, 10:03:20 PM
Paul,

Could you create a simple example of how to put a tab control on a tab. In other words, say I have a tab control with 3 tabs.....I want to have another tab control say on tab 2 of the original tab control.

You might also explain the easiest approach or method to using multiple tabs controls in the designer. Once I drop the second tab control onto the first, it disappears during the design process. If I use the send to back option on the first, I can then see the second, but I am not able to select it to change any properties.

Thanks,
Gary
Title: Re: Tab Control on a tab
Post by: Paul Squires on November 03, 2009, 10:29:21 PM
Hi Gary,

I have attached a "Tab on Tab" project for you to look at. It handles the exact situation that you have described in your post.

I think that your problem is understanding that the child Tab Control does not go directly onto the parent Tab Control. The child Tab Control goes on the form that represents the second page of the parent tab control. I think that it is easier to understand by looking at the project rather than me trying to explain it here in words.  :)

Once you get the initial point that the tab controls go on Forms rather than embedded within each other, then the whole process is easy. Having a separate Form for the child pages of each tab control is also a very good, structured, approach to dealing with tab controls. It helps separate the code for each tab and make it easier for you to design and code.

If anything in the project is unclear then please let me know.

Title: Re: Tab Control on a tab
Post by: Gary Stout on November 03, 2009, 10:45:59 PM
Paul,

Thanks for the quick reply! I will download the example and study the code, but from your explanation, I now understand where I was having difficulty. The whole child form thing is not real difficult....just a different way of doing things.

I have to admit, I am totally impressed with FF3 and the new look. Very Professional! Very affordable price!

I also like the recent tutorial videos. I hope you will produce more of these to help us FF newbies get a jump start. A complete simple project step-by-step from design, setting properties and adding event code would be GREAT! Maybe a simple address book or contact list with emphasis on callbacks.

Title: Re: Tab Control on a tab
Post by: Paul Squires on November 03, 2009, 10:56:21 PM
Quote from: Gary Stout on November 03, 2009, 10:45:59 PM
Thanks for the quick reply! I will download the example and study the code, but from your explanation, I now understand where I was having difficulty. The whole child form thing is not real difficult....just a different way of doing things.
Most things in programming Windows apps are easy once you see them in action. I remember when I moved from VB to PB and I was so lost. I concentrated on DLL's back then (that's how Cheetah Database came to life). When I wanted a dedicated code editor for PB, I took the dive into writing JellyFish using PB. I knew nothing about GUI development. VB had shielded me from so much. It took a lot of reading (mostly POFFS), trial and error, and asking questions. That's how we all learn. There is no one person in the PB world that knows it all. Sure, some know more than others but it is as a community that shares its knowledge where we all learn.

Quote
I have to admit, I am totally impressed with FF3 and the new look. Very Professional! Very affordable price!
Excellent! I am very happy that FF3 is looking good to you. It was certainly a long time in development. There was much more that could have been done and hopefully I can continue to improve FF3 more as time goes by.

QuoteI also like the recent tutorial videos. I hope you will produce more of these to help us FF newbies get a jump start. A complete simple project step-by-step from design, setting properties and adding event code would be GREAT! Maybe a simple address book or contact list with emphasis on callbacks.
Video is the future (well, really it is now the present) of the internet. I learn more by watching a 5 minute video than I do by reading a 20 page tutorial. In another thread it was suggested to ask the FF3 community what they would like to see covered. I am open to trying to explain anything and everything - at least to the best of my knowledge. Once the purchase cycle dies down this week then I will have more time to deal with some initial FF3 bugs and develop more training material. I'll start a thread/poll about this subject when the time is right.

Hang in there.... much more to come.

:)




Title: Re: Tab Control on a tab
Post by: Rolf Brandt on November 04, 2009, 07:08:58 AM
Thanks for the Tab example. I was just looking for that too.

Rolf
Title: Re: Tab Control on a tab
Post by: Gary Stout on November 10, 2009, 02:06:00 PM
I am still trying to get the whole tab thing clear in my mind. I understand the child form process and I am good with that, but studying the code in the attached example, I can not see how the tab control that is on tab #2 (main) is associated with child form that displays the second tab control. I see that each child form has TabControlChild set to true. I believe I understand all of that, but how does FF know to display frmMainTab2, when I click tab #2 and not frmMainTab3???

I am probably making it way harder than it really is, but my mind has to see the logic behind what is happening.  :D

Thanks,
Gary
Title: Re: Tab Control on a tab
Post by: Gary Stout on November 10, 2009, 02:33:28 PM
Found It!!! The association is made in the Tab Control custom properties for those that might also be having the same difficulty.

Gary
Title: Re: Tab Control on a tab
Post by: Paul Squires on November 10, 2009, 03:05:43 PM
Right you are: You need to assign the child tab forms to the tab control via the "Custom" property in the PropertyList.

Creating workable TabControls in FireFly is pretty easy compared to having to do it by hand. That was one of my biggest disappoints with PBForms - no tabcontrol designer.
Title: Re: Tab Control on a tab
Post by: Gary Stout on November 10, 2009, 03:18:14 PM
I like it!!! It is just the "trying to teach an old dog new tricks" thing for me  ;)

Gary