Normal Topic Tab Labels (Read 466 times)
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Tab Labels
Nov 1st, 2011 at 3:13pm
Print Post Print Post  
I have a form that uses tab labels.  I know that I can hide the tab labels in designer, but I was wondering if there is a way to "hide" and "unhide" them in my programming so I can turn them on at certain times when running the file.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Tab Labels
Reply #1 - Nov 1st, 2011 at 4:14pm
Print Post Print Post  
Hello,

You can hide and show the Tab labels by changing the label alignment of the tab group itself using the Attribute() function in Sbasic.

Example of hiding the Tab Labels
Code
Select All
#Include "sbasic_include.sbas"

	Attribute(LE2, ATTR_ID_LABEL_ALIGNMENT, 13)
	ForceRedraw()
 



Example of Showing the Tab Labels
Code
Select All
#Include "sbasic_include.sbas"

	//Show Labels at the Bottom
	Attribute(LE2, ATTR_ID_LABEL_ALIGNMENT, 4)

	//Show Labels at the Top
	//Attribute(LE2, ATTR_ID_LABEL_ALIGNMENT, 1)

	ForceRedraw()
 



Note: You will need to use the Tab group's name itself which can be found by following the steps below.
Clicking on the tab group in Sesame Designer
Go to the Other tab of the Property Editor
Click in the Name Field
Press F5
The name it gives you is the name of the Tab group itself, probably something like LE5

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Tab Labels
Reply #2 - Nov 1st, 2011 at 7:00pm
Print Post Print Post  
Thanks.  I tried the programming, but I get a error message when I test it.  The message is "Unknown Identifier...ATTR"
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Tab Labels
Reply #3 - Nov 1st, 2011 at 7:11pm
Print Post Print Post  
Hello,

Make sure you have the sbasic_include.sbas file in the same directory that is specified in the Start In: directory of the Sesame icon.

You can also manually substitute ATTR_ID_LABEL_ALIGNMENT for 24 in your programming as well if you do not want to use the include file.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Tab Labels
Reply #4 - Nov 1st, 2011 at 7:42pm
Print Post Print Post  
Thanks, I found that my sbasic statement had a typo.  I was missing the "_".  It's working fine.
  
Back to top
 
IP Logged