The labels of tabbed button look plain; how to change?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

The labels of tabbed button look plain; how to change?

Post by sritcp » Sat Nov 07, 2015 4:15 pm

I feel, to make tabbed buttons more usable, the labels need to stand out more. But I see that

i) I can't change the highlight color; "the hiliteColor" property doesn't work with tabbed buttons. Is there another way?

ii) I can't change the backColor. If I change the backColor of lines in a field and set the text of the tabbed button to the text of the field, the color doesn't "take"

iii) Same with icons. If I set the imageSource of char in a field, it doesn't transfer to the tabbed button labels.

I wonder why the tabbed button labels are so "hard-wired".

Regards,
Sri

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: The labels of tabbed button look plain; how to change?

Post by dunbarx » Sun Nov 08, 2015 2:46 am

Sri.

The text shown in a tab button is its label, not its text.

That said, I think you are still right in that there is little control available to us over certain properties of that label. That is likely common to all button styles, even though tab buttons certainly appear to have at least one other property, that is, the "tab" text as opposed to the "label" text.The tab and label text seem locked together. If btn 1 is a tab button, you can:

Code: Select all

set the TextColor of btn 1 to "red"

But you cannot

Code: Select all

set the TextColor  of the label of btn 1 to "red"
Even though the "label" is the property that lets you actually show stuff in the button. So you certainly cannot:

Code: Select all

set the backColor  of the label of btn 1 to "red"
And LC interprets

Code: Select all

   set the backColor of btn 2 to"red"
as the button itself, not its text, as in

Code: Select all

answer btn 1
I think you will have to roll your own.

Craig

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: The labels of tabbed button look plain; how to change?

Post by sritcp » Sun Nov 08, 2015 4:27 am

Craig:

Are we talking about the same control?
I was referring to button "Tab Menu" where the style = menu; and the menuMode = tabbed. See image below.
dunbarx wrote: ....The text shown in a tab button is its label, not its text.....

Code: Select all

Set the text of button "Tab Menu" to "Tab1" & cr & "Tab2" & cr & "Tab3"
sets the name of the tab labels.

May be I am not explaining myself very well. (I was talking about the hiliteColor of the tab labels. It was not very clear in my original post)

Regards,
Sri
Attachments
Tab Menu.png
Tab Menu.png (6.35 KiB) Viewed 3299 times

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: The labels of tabbed button look plain; how to change?

Post by bn » Sun Nov 08, 2015 10:30 am

Hi Sri,
I wonder why the tabbed button labels are so "hard-wired".
those take on the appearence of the operating system. Just like the "Standard Button", "Default Button", "Option Menu" "Progress Bar" etc. As such appearance can not be changed by the developer. This is also to make them cross platform.

You would have to make your own tabbed button which is not an easy task for the tabbed button. I think Scott Rossi has done that.

Kind regards
Bernd

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: The labels of tabbed button look plain; how to change?

Post by dunbarx » Sun Nov 08, 2015 3:09 pm

Sri.

Yes, a tabbed button.
If I change the backColor of lines in a field and set the text of the tabbed button to the text of the field,...
I read your point as you wrote it, that the backColor of a line in a field could be transferred, with its color, to the text of the button. That is why I said that the visible "field" below the tabs is the label, not the text.

Craig

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: The labels of tabbed button look plain; how to change?

Post by sritcp » Sun Nov 08, 2015 10:43 pm

Thanks Bernd and Craig!

Regards,
Sri.

Post Reply