You can decide which one styles win (if there is a conflict) in the style sheet. Whichever appears last has priority. The default style themes will set the cursor to default (as opposed to a pointer) and the font color to gray, and that takes priority over the selected styles. The selected styles will still set the background color of the tab because the disabled style doesn't override it.
Thanks, John LaBanca [EMAIL PROTECTED] On Fri, Sep 19, 2008 at 12:32 PM, Freeland Abbott < [EMAIL PROTECTED]> wrote: > Well, I don't necessarily think you need a new style, but we may at least > need to be deterministic about which one "wins" if they're both applied (and > overlap in some setting)... so, if your selected tab has a white background > and your disabled ones have gray with italic text, then selected & disabled > should probably have italic text, but what color is its background? > > Maybe "either one, it depends" is an okay answer for such an odd condition, > but we should explicitly decide that! > > > > On Fri, Sep 19, 2008 at 12:11 PM, John LaBanca <[EMAIL PROTECTED]>wrote: > >> Note that only the tab in the TabBar is disabled, not the contents of the >> TabPanel. If the user is on a disabled tab, they can still interact with >> the contents of the tab. The only way this can happen is: >> 1. The end user is on a tab which becomes programatically disabled >> 2. The app programatically selects a disabled tab >> >> Since both of these scenarios require a programatic decision, the app is >> responsible for taking the appropriate action of booting the user or not. >> We don't necessarily *need* a "disabled-but-selected" tab styling as the >> most common styles (changing font color) can be handled without it, but it >> could be helpful in some scenarios. Anyone have thoughts on this? >> >> Thanks, >> John LaBanca >> [EMAIL PROTECTED] >> >> >> On Fri, Sep 19, 2008 at 11:36 AM, Freeland Abbott < >> [EMAIL PROTECTED]> wrote: >> >>> >>> >>> ---------- Forwarded message ---------- >>> Date: Fri, Sep 19, 2008 at 11:28 AM >>> Subject: Re: [gwt-contrib] Re: Proposed API Addition - >>> TabBar.setTabEnabled(int, boolean) >>> To: [email protected] >>> >>> >>> I think I agree (where would we boot them too, if we had the job? The >>> other option is something like an IllegalStateException...), but it means >>> you'll need a selected-but-disabled visual style. And are the (displayed) >>> contents of the selected-but-disabled tab themselves disabled, or is it more >>> of "disabled as soon as you leave"? >>> >>> >>> >>> On Fri, Sep 19, 2008 at 10:09 AM, John LaBanca <[EMAIL PROTECTED]>wrote: >>> >>>> I think that disabling the selected tab is a valid state, as is >>>> programatically selecting a disabled tab. It should be up to the user to >>>> decide if the user should be booted off the tab if its disabled. >>>> >>>> Thanks, >>>> John LaBanca >>>> [EMAIL PROTECTED] >>>> >>>> >>>> On Fri, Sep 19, 2008 at 10:07 AM, Joel Webber <[EMAIL PROTECTED]> wrote: >>>> >>>>> Sounds ok to me. The only caveat I would add is to think carefully >>>>> about how we handle the various states that might come up inadvertently -- >>>>> for example, what happens if you disable the currently-selected tab? >>>>> >>>>> >>>>> On Thu, Sep 18, 2008 at 9:51 PM, Emily Crutcher <[EMAIL PROTECTED]>wrote: >>>>> >>>>>> Seems like a good idea to me. >>>>>> >>>>>> On Thu, Sep 18, 2008 at 9:22 PM, John LaBanca <[EMAIL PROTECTED]>wrote: >>>>>> >>>>>>> Contributors - >>>>>>> >>>>>>> I propose adding the following method to TabBar: >>>>>>> >>>>>>>> public void setTabEnabled(int index, boolean enabled) >>>>>>>> >>>>>>> >>>>>>> When disabled, a tab will be assigned the additional style >>>>>>> "gwt-TabBarItem-disabled", and the user will not be able to select the >>>>>>> tab >>>>>>> using the mouse or keyboard. The style themes will be updated to >>>>>>> reflect >>>>>>> the disabled state. >>>>>>> >>>>>>> You can see the proposed patch attached. Here is the associated >>>>>>> issue: >>>>>>> http://code.google.com/p/google-web-toolkit/issues/detail?id=2527 >>>>>>> >>>>>>> Does anyone see any problem with this enhancement? >>>>>>> >>>>>>> Thanks, >>>>>>> John LaBanca >>>>>>> [EMAIL PROTECTED] >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> "There are only 10 types of people in the world: Those who understand >>>>>> binary, and those who don't" >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
