Page 1 of 1

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

Posted: Sat Nov 07, 2015 4:15 pm
by sritcp
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

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

Posted: Sun Nov 08, 2015 2:46 am
by dunbarx
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

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

Posted: Sun Nov 08, 2015 4:27 am
by sritcp
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

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

Posted: Sun Nov 08, 2015 10:30 am
by bn
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

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

Posted: Sun Nov 08, 2015 3:09 pm
by dunbarx
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

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

Posted: Sun Nov 08, 2015 10:43 pm
by sritcp
Thanks Bernd and Craig!

Regards,
Sri.