I need some help with the TabControl

Started by Iulian, October 12, 2009, 05:21:23 AM

Previous topic - Next topic

Iulian

Hi I`m a beginner and I have a question: where I can find Tab Control Button? I have watched the official ODCL tutorial where it is used. I see only the Tab Strip button on the Toolbox toolbar.Thanks.

Fred Tomke

Hello and welcome to the board.

In the OpenDCL Studio toolbox there are many controls to add. Pick the tab control and draw the area of the tab control onto your form. It has 3 tab strips by default. Doubleclick the tab control in the Z/Tab-orderlist to manage the tabstrips (number of tabstrips, their captions/labels and images). In the project tree all your tabstribs are listed below your current form: each tabstrip with its caption/label.

Hope that helps.
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

BazzaCAD

Quote from: Iulian on October 12, 2009, 05:21:23 AM
Hi I`m a beginner and I have a question: where I can find Tab Control Button? I have watched the official ODCL tutorial where it is used. I see only the Tab Strip button on the Toolbox toolbar.Thanks.

Hi Iulian,
Welcome to the forums. Which tutorial are you referring to?
The Tab Strip & Tab Control are the same thing. It was renamed from Tab Control to Tab Strip.
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

Fred Tomke

Hm, if Tabstrip is the same as tab control: what is the correct name for a single "tab"?

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

Fred, the entire control is a "tab strip control", the "tabs" are the buttons you click on, and the "tab pages" are the different sets of controls that appear when you click on different tabs. Does that help?

Iulian

Hello, I have attached a picture with the difference between the tab strip and tab control. in my toolbox I find only the tabstrip button, and I would like to use tabControl, which is in the first image, because is more attractive than tabstrip. the image which contains the tabcontrol is from the "The official OpenDCL for beginners tutorial" . there was used, on the DLCMaster Control Bar.Thanks again.

Fred Tomke

Quote from: owenwengerd on October 12, 2009, 12:10:02 PM
Fred, the entire control is a "tab strip control", the "tabs" are the buttons you click on, and the "tab pages" are the different sets of controls that appear when you click on different tabs. Does that help?

Ah, thanks Owen.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Quote from: Iulian on October 14, 2009, 01:18:26 AM
...I would like to use tabControl, which is in the first image, because is more attractive than tabstrip...

Hi, Iulian, both are the same:

  • Click once on the tab strip control and search the properties list for the property UseVisualStyle. Set it to true.
  • Doubleclick the tab strip control in the Z/tab orderlist. There you can assign icons to the tabs.

In the end it should look like the first image.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Iulian

Thanks a lot guys.This was my problem.
Now, I have another question, if can anybody help me:
What tools I can use in order to obtain the next thing: like in the image attached, when the option button 1a is checked, in the Frame/Rectangle 1b must be the picture below with that four (4) combo boxes. Now, when I check the option button 2a, in the same selected frame/rectangle, I want to appear the next image, 2b, with other four (4) combo boxes. I have some knowledges about Borland Delphi, which is a Object Programming Language similar with ODCL, and in that program I can use a frame like this: if I put a picture and some combo boxes on the Frame1, and than, another frame, Frame2, over the Frame1, which contains already some combo boxes and one pictures, I can use a Text Button in order to make invisible the frame1, and in this case is visible Frame2, with all his combo boxes and pictures, and if I push the same button another time, Frame2 becomes invisible and Frame1 becomes visible, with all his combo boxes and his picture. My question is: How I can do this with ODCL? Because, if I put something on the Frame1, and I drag this frame, everything I put on it, remains in the same place, and they should move with his "parent" Frame1. In Delphi if I drag the Frame1 with everything is on it, everything comes with Frame1.

BazzaCAD

You don't need to do anything with the Frames.
Just add a Picture Box Control and change the Picture when the user clicks the options buttons...
(dcl_Control_SetPicture Untitled_Form1_PictureBox1 NewValue [as PictureID])

You'll need to have the Pictures pre-loaded into your project.
Use the "Picture Folder" Camera icon on the top toolbar to load the.
If you always have 4 Combo Boxes, just use the same 4 Combo Boxes.
You don't need 4 Combo Boxes for each option.
If you need more or less then add them and use:
(dcl_Control_SetVisible Untitled_Form1_ComboBox1 NewValue [as Boolean])
To hide\show them....
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

owenwengerd

The tab strip control is roughly equivalent to what you describe. Each tab page is a "frame". If you want to use your own buttons instead of the tab strip's built-in tabs, you have to do a little extra work, but it is possible to use the tab strip control's tab pages to achieve the same effect that frames give you in Delphi.

Iulian

Thanks a lot guys. A new problem for me is now resolved.