March 29, 2024, 04:45:16 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Three questions regarding the tab control

Started by jayelbee, April 07, 2014, 12:53:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jayelbee

1.  Is the sequencing of using a tab control to use the tab editor to create a tab control file and the to put the tab
     control on the form and assign the file to it  or is it the other way around.  I seem have mixed results - sometimes it
     works one way and other times the tab control disappears on the next invocation of IWB+.  This problem may be
     related to my flaky monitor problem, so don't invest a lot of time researching it

2.  What is the process to populate the tabs with edit controls?  Is it manual coding or is there some other method.

3.  Do you have a sample of the code generated with populated tabs?

Thanks

LarryMc

1. It shouldn't matter if you create the tab file before or after you create the tab control.  Now, if you create the tab control, without assigning a tab file, and then compile it don't expect the tab control to look like anything you want. 
but, if you create the tab control, without assigning a tab file, and then save the project the tab control should be there every time when you open the IWB+ project back up.

2. adding a tab control to the form merely generates the code to create the control itself, like this
'@@CTRL_INIT_main
CONTROL main,@SYSBUTTON,"Button 1",43,99,60,25,0,main_BUTTON1
TabControl main,83,243,160,50,@TCS_HOTTRACK|@TCS_RIGHTJUSTIFY|@TCS_MULTILINE,0,main_TABCTRL1
'@@

When you creat a tab file and add it to theproject then you can assign the tab file to the tab control in the control parameters windows.

The result would look something like this
'@@CTRL_INIT_main
CONTROL main,@SYSBUTTON,"Button 1",43,99,60,25,0,main_BUTTON1
TabControl main,83,243,160,50,@TCS_HOTTRACK|@TCS_RIGHTJUSTIFY|@TCS_MULTILINE,0,main_TABCTRL1
'@@
'@@INIT_main
SETFONT main,"MS Sans Serif",8,400,0
SETWINDOWCOLOR main, RGB(255,255,255)
FRONTPEN main, RGB(0,0,0)
SETFONT main,"MS Sans Serif",8,400,0,main_BUTTON1
SETCONTROLCOLOR main,main_BUTTON1,RGB(0,0,0),RGB(192,192,192)
SETFONT main,"MS Sans Serif",8,400,0,main_TABCTRL1
SETCONTROLCOLOR main,main_TABCTRL1,RGB(0,0,0),RGB(192,192,192)
tcInsertTab main,main_TABCTRL1, 0,"Jan"
tcInsertTab main,main_TABCTRL1, 1,"Feb"
tcInsertTab main,main_TABCTRL1, 2,"Mar"
CENTERWINDOW main
'@@


And if you selected the tooltips flag for the tab control you would get something like this
'@@CTRL_INIT_main
CONTROL main,@SYSBUTTON,"Button 1",43,99,60,25,0,main_BUTTON1
TabControl main,83,243,160,50,@TCS_HOTTRACK|@TCS_MULTILINE|@TCS_RIGHTJUSTIFY|@TCS_TOOLTIPS,0,main_TABCTRL1
'@@
'@@INIT_main
SETFONT main,"MS Sans Serif",8,400,0
SETWINDOWCOLOR main, RGB(255,255,255)
FRONTPEN main, RGB(0,0,0)
SETFONT main,"MS Sans Serif",8,400,0,main_BUTTON1
SETCONTROLCOLOR main,main_BUTTON1,RGB(0,0,0),RGB(192,192,192)
SETFONT main,"MS Sans Serif",8,400,0,main_TABCTRL1
SETCONTROLCOLOR main,main_TABCTRL1,RGB(0,0,0),RGB(192,192,192)
tcInsertTab main,main_TABCTRL1, 0,"Jan"
tcSetTip main,main_TABCTRL1, 0,"January"
tcInsertTab main,main_TABCTRL1, 1,"Feb"
tcSetT
CENTERWINDOW main
'@@

which won't compile - seems we've just identified a problem with generating the code for tooltips.

I'll see if I can fix it and issue a new released.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

jayelbee

Attached (hopefully) is a screenshot of the tab control properties panel in IWB showing NONE.  I have included the entire folder of the project I am experimenting with.  As you can see there are 4 .vdta files in the folder but I can never
get them to show up in the project. 

Also when in the tab editor the preview button blinks rapidly on and off but nothing ever happens.


LarryMc

appears you have found a 2nd flaw
I'm looking into it all


Thanks for reporting.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

you had a file named ".vdta".  My routine that loads the combobox of available via a loop that test for a blank filename after stripping the ext.
So the loop thought there were no tab files present.
Restructured the loop to work correctly even with that bogus blank file name.
And now all the tab files show up in the editor and you can also select the desired file in the tab control parameter window.

Did a quick check and found the exact same problem in the toolbar editor.

Also, stumbled across the fact that in both of those editors I never added the code for importing tab or toolbar files from other folders/projects.
The import function did get coded in the Menu Editor.

It will basically be copying that code into the other two editors and changing the appropriate variable names.  So that's an easy fix.

So, for right now I'm focusing on why the generated code is being truncated in the code windowed.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Pretty sure I now have all the issues resolved.
Need to do some more testing.
Will try to get a new release later today or tomorrow at the latest.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library