Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6919589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:00:37+00:00 2026-05-27T10:00:37+00:00

I have 4 tabs. Each tab is represented by a button. Those buttons are

  • 0

I have 4 tabs. Each tab is represented by a button. Those buttons are used to select the currently displayed tab. Each button has an icon and text.

I’d like to highlight the currently selected tab by changing background color and text label color of the corresponding button. I’d like to do it using Theme and Resource Editor.

I created theme and specified unselected, selected and pressed styles for UIID “Tab”. My tabs look great in Sun WTK! Fine! But I found that on a real phone the tabs always look like unselected. I tried on Nokia 5800 XPressMusic and C7. Why the difference?

After some experiments I found out the reason – the buttons may be only in 2 states: unselected and pressed. They never be in the selected state. On the emulator when I move to a button using navi keys, it becomes selected.

So, what should I do to mark the current tab?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:00:38+00:00Added an answer on May 27, 2026 at 10:00 am

    I implemented what I needed. Thanks to Shai and his example.

    I didn’t use theme properties and made all customizations in the code. I did so because I didn’t catch how setting unique UIID can help me, since the problem is not in the identifying the UIID for which the props have to be changed, but in identifying the button’s style to be changed.

    Below some important notes of my solution.

    1. Call addActionListener for the buttons AFTER they have added to the tabs.
    2. When any tab button is pressed, update UNSELECTED styles of the tab buttons. Also you can change their icons.
    3. Call form’s repaint() after step 2.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several tabs. Each tab has several nested elements that contain checkbox input
Currently, I have a TabLayoutPanel with a few tabs, inside of each tab is
I need to have a TabHost consisting of two tabs where each tab represented
I have a tabactivity with several tabs. Each tab has an ActivityGroup associated with
i have this specific scenario: i have 4 tabs and each tab has it's
I have a window that has some tabs,in each tab i can create a
In android, I have a TabActivity with 2 tabs and each tab has it
I have several tabs in my application, and each tab loads a different sub-page
I have a tab container with 5 tabs, each tab contains an update panel.
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.