Page 1 of 1
How to Colour a Tab button
Posted: Thu Jan 24, 2013 4:30 pm
by Traxgeek
Hi,
I'm using a tab control on a card.
The tab control has 4 tabs and I'm using the control to show/hide one of 4 groups of controls.
So far, so good, BUT (again

) How do I colour my Tab. Or even just set it's background to transparent / not opaque ?
There appears to be no 'Opaque' property for a tab button - so I can't see how to make it transparent.
Also, if I go to 'Colors and Patterns' and select/change the Tab's Fill color - nothing happens EXCEPT for a thin line of the selected colour appearing at the top right border of the recalcitrant Tab button !
The 'Text' color works...
But that seems to be about it... I can't change the highlighted text, border color, bevel or shadow colours. Well, I can change them in the Property Inspector for the Tab button in the IDE byt little (if anything) happens on the card.
To be frank, at this stage I'd be perfectly happy with just a transparent Tab button (so that it 'picks up' the cards background colour...
Sorry, I'm lost... What am I missing please ? Maybe someone can give me a boot in the right direction please ?
TIA
Regards.
Re: How to Colour a Tab button
Posted: Thu Jan 24, 2013 4:35 pm
by Klaus
Hi Traxgeek,
the actual TABS (on top of the TABBED button) are, like most other UI elements,
supplied by the underlying OS and so you cannot modify them*, or only to a certain extent.
* like "progress bars", "default"/"checkbox"/"radio" buttons etc.
Fazit: You need to create your own controls to get this "feature"!
Best
Klaus
Re: How to Colour a Tab button
Posted: Thu Jan 24, 2013 5:58 pm
by Traxgeek
hmmm... OK.
Thanks Klaus... saves me messing about trying to achieve what can't be done !
Regards.
Re: How to Colour a Tab button
Posted: Thu Jan 24, 2013 7:28 pm
by magice
You might have some luck using the blending tab of the property inspector. I needed tabs to change color on focus, I used blending to make the tab menu semi transparent, then used colored rectangle graphics behind the tabs as the cards changed.
Re: How to Colour a Tab button
Posted: Thu Jan 24, 2013 7:56 pm
by doc
Traxgeek ,
If you really need colored tabs and don't mind some extra work, you can simulate them easy enough using transparent buttons with hidden button images of your own design and with the benefit that you can place the "tabs" anywhere you want them (top, botton, or either side). I've included a sample stack to give you a head start of one way it might be done, depending on your needs.
Building your own custom controls (or simulating them) is one of the most powerful and fun things about using LiveCode.
HTH,
-Doc-
Re: How to Colour a Tab button
Posted: Fri Jan 25, 2013 8:40 am
by shaosean
Klaus wrote:the actual TABS (on top of the TABBED button) are, like most other UI elements,
supplied by the underlying OS
Actually, Rev uses emulated UI elements..
http://docs.runrev.com/Property/lookAndFeel
Re: How to Colour a Tab button
Posted: Fri Jan 25, 2013 10:56 am
by Traxgeek
Wow !
I'm still definitely in the 'beginner' category BUT, although the curve is steep, I am learning fast...
Thanks magice, I'll 'play' with the semi transparent/coloured rectangles behind idea - seems easiest to start with - and then, as my confidence grows and I've handled the nav. and basic functionality of my app., I'll come back and play with Doc's sample stack (thanks a million Doc).
So, thansk all. Much appreciated...
Regards.
Re: How to Colour a Tab button
Posted: Fri Jan 25, 2013 2:16 pm
by Mark
Hi,
A long time ago, I made
a very simple example, which you can find on
RevOnline.
Kind regards,
Mark
Re: How to Colour a Tab button
Posted: Fri Jan 25, 2013 10:11 pm
by doc
Welcome!
I think that you will find as you gain experience, when it comes to custom interface design, LiveCode is really hard to beat
...don't have a certain feature or look? Just roll your own.
-Doc-
Re: How to Colour a Tab button
Posted: Sat Jan 26, 2013 11:11 am
by Traxgeek
Aha - magice, the Belnding idea is quick and simple...
I settled on 'notSrcCopy' method and a 'Level' of 70%... and then 'struggled' (not important at this stage) with exactly how a selected text colour became some totally (what appeard to me - obviously not !) random text colour on my tab. With some hour or two of messing about though I have the colour scheme I need BUT do also need to spend some time on the 'logic' of bitwise colour mapping...
All-in-all delighted tho.
Mark / Doc, I downloaded your tab control codes... the light is dawning - love it ! It's been (just!) some 4 weeks, but, with the help I've received here on the forum, I'm (already) begining to appreciate LiveCode - and after 15+ years of VB, C, Ruby, Lua and Java that's gotta be asaying something even if the learning curve continues to be pretty steep !
So, this weekend it's on to some skinning and then deploying the working structure of my app (albeit very unfinished) to an iPad/iPhone 3GS and an Transformer Infinity - Onwards and upwards !!!
Thanks to all.
Have a great weekend !
Re: How to Colour a Tab button
Posted: Sat Jan 26, 2013 5:57 pm
by magice
Traxgeek wrote:Aha - magice, the Belnding idea is quick and simple...
I settled on 'notSrcCopy' method and a 'Level' of 70%... and then 'struggled' (not important at this stage) with exactly how a selected text colour became some totally (what appeard to me - obviously not !) random text colour on my tab.
You can always add a text label on top of the tab as well.
Re: How to Colour a Tab button
Posted: Sat Jan 26, 2013 11:52 pm
by doc
Traxgeek,
If you really want to see the ultimate when it comes to building custom controls and/or skinning goes with LIveCode applications, you'll need to pay a visit to the Tactile Media web site. Be sure to allow plenty of time for browsing and keep a towel on hand for the inevitable drooling over such cool creations.
http://www.tactilemedia.com
Scott Rossi does custom UI's like nobody else I've ever seen, both with or without using LiveCode. I only dream of having that kind of talent.
-Doc-