Recent

Author Topic: How do I add tabs to my application?  (Read 4550 times)

JoshM

  • Jr. Member
  • **
  • Posts: 57
How do I add tabs to my application?
« on: December 19, 2012, 07:55:54 pm »
Hi so I've basically created a simple calculator and want to move on to making a scientific calculator. What I want to do is have just the simple calculator on one tab and the scientific calculator on another tabs. I know there's a way to do it as most programs and even Lazarus itself has tabs. I've seen the TTabControl but I've got no idea how to actually get it working   :'(

Can someone give me a REALLY basic set of instructions telling me how to add tabs to my program. Thanks!

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: How do I add tabs to my application?
« Reply #1 on: December 19, 2012, 08:11:48 pm »
In this case you should rather use TPageControl. You can simply paste it on the form, then right click and select Add Page.

If I understand correctly, you have already finished calculator on the form.

I would do this:
1) Backup everything !  :)

2) Paste new TPageControl on the form

3) Add page (TPageControl consists of TTabSheets)

4) Select all components of your calculator (using Left mouse button + Shift key)

5) Change their Parent property using right click Change Parent... and select TabSheet1

That's all. Good luck.

Now you can add the second TabSheet and start to design scientific calculator directly on it.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

JoshM

  • Jr. Member
  • **
  • Posts: 57
Re: How do I add tabs to my application?
« Reply #2 on: December 20, 2012, 11:50:43 am »
Thanks so much! I was using the TPageControl and TtabControl things on my application, but didn't know how to add tabs/pages! All I had to do was right click! Thanks  ::)

 

TinyPortal © 2005-2018