Ju Yang Active Member Licensed User Longtime User May 22, 2016 #1 I'm using the SegmentedControl in a page, but the default appearance style of the SegmentedControl is not what I want, i.e., I need to customize the background, selected background, text color, font and font size, even put some images or icons besides the text... Orz... Too many requests? Let's say how to implement a SegmentedControl like this: Say there are three tabs, and the middle tab is currently selected. I guess we can use a "selected background image" with the correct background color and a red line on the bottom of it. But it is still necessary to change the selected text color and the font, right? Could anyone help to write some code fragments to demonstrate how to do it? Thanks in advance! Attachments 屏幕快照 2016-05-22 上午11.07.54.png 27.9 KB · Views: 852
I'm using the SegmentedControl in a page, but the default appearance style of the SegmentedControl is not what I want, i.e., I need to customize the background, selected background, text color, font and font size, even put some images or icons besides the text... Orz... Too many requests? Let's say how to implement a SegmentedControl like this: Say there are three tabs, and the middle tab is currently selected. I guess we can use a "selected background image" with the correct background color and a red line on the bottom of it. But it is still necessary to change the selected text color and the font, right? Could anyone help to write some code fragments to demonstrate how to do it? Thanks in advance!
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #2 It is not possible to make the SegmentedControl look like this. Upvote 0
Ju Yang Active Member Licensed User Longtime User May 22, 2016 #3 Erel said: It is not possible to make the SegmentedControl look like this. Click to expand... Do you have suggestions if we need to implement this? Is there any components instead of SegmentedControl which we could use? Upvote 0
Erel said: It is not possible to make the SegmentedControl look like this. Click to expand... Do you have suggestions if we need to implement this? Is there any components instead of SegmentedControl which we could use?
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #4 There is the built-in TabBarController which is a bit similar. The other option is to implement this interface with buttons and a bitmap for the horizontal line. Upvote 0
There is the built-in TabBarController which is a bit similar. The other option is to implement this interface with buttons and a bitmap for the horizontal line.
Ju Yang Active Member Licensed User Longtime User May 22, 2016 #5 Erel said: There is the built-in TabBarController which is a bit similar. The other option is to implement this interface with buttons and a bitmap for the horizontal line. Click to expand... I don't quite understand your saying "implement this interface with buttons and a bitmap". Do you mean we should define 3 buttons and set the selected background and should handle the events manually...? Could you please show me some step by step example code for it? Upvote 0
Erel said: There is the built-in TabBarController which is a bit similar. The other option is to implement this interface with buttons and a bitmap for the horizontal line. Click to expand... I don't quite understand your saying "implement this interface with buttons and a bitmap". Do you mean we should define 3 buttons and set the selected background and should handle the events manually...? Could you please show me some step by step example code for it?
Erel B4X founder Staff member Licensed User Longtime User May 23, 2016 #6 Ju Yang said: Do you mean we should define 3 buttons and set the selected background and should handle the events manually...? Click to expand... You can use regular buttons and change their look when they are selected (clicked). There is no step by step example for this. Upvote 0
Ju Yang said: Do you mean we should define 3 buttons and set the selected background and should handle the events manually...? Click to expand... You can use regular buttons and change their look when they are selected (clicked). There is no step by step example for this.