Combobox removing focus!? help!

Why when I use the combobox component does it remove focus
from other movieclips?? For instance...I have a button with
onRollOver and onRollOut functions. These work fine, but once I
click on a combobox, they break...and won't work.
I've looked in other places but I haven't found a fix for
this yet. Doing setfocus(this) only puts a ugly yellow highlight
box around my button, and then kills the swf with an infinite loop.
Any ideas?

hi, hold your data in a Hashtable with the value as key
and the visible text as value,use a renderer for the combobox like here
class MyCellRenderer extends JLabel implements ListCellRenderer {
public MyCellRenderer() {
setOpaque(true);
public Component getListCellRendererComponent(
JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
setText(value.toString());
setBackground(isSelected ? Color.red : Color.white);
setForeground(isSelected ? Color.white : Color.black);
return this;
in the method getListCellRendererComponent you get your hashtable as object parameter,get the visible text from the hashtable and call setText (..)
you can also make a combined String with value and text
and take only the visible text in the renderer(this solution is not so bombastic as before)

Similar Messages

  • Combobox removing focus?

    Why when I use the combobox component does it remove focus
    from other movieclips?? For instance...I have a button with
    onRollOver and onRollOut functions. These work fine, but once I
    click on a combobox, they break...and won't work.
    I've looked in other places but I haven't found a fix for
    this yet. Doing setfocus(this) only puts a ugly yellow highlight
    box around my button, and then kills the swf with an infinite loop.
    Any ideas?

    While it depends partly on what is outside the textfield, one way would be to add an event listener to the stage and then check what was clicked.  If it happened to be the stage, set the focus onto the stage.
    stage.addEventListener(MouseEvent.MOUSE_UP, focusStage);
    function focusStage(evt:MouseEvent):void {
        if(evt.target == stage){
           stage.focus = stage;

  • I have an application in my Firefox Options which I can't remove any help would be great

    I have a download torrent called Bitlord which I have removed through my control panel - but it appears it is still there in my Options Applications which I can't removed - any help would be great

    Hello liz1411, check also if you have something related to Bitlord (like toolbars) in Firefox Extensions and delete it, go from Firefox button(the orange button at the right top) > Add-ons > Extensions.
    thank you

  • How to remove the help link button on EP7.0?

    We have a need to remove (or hide)  the "help" button on EP7.0.
    We have tried different ways but no success.
    Would you please help?  Thanks a lot!

    Thanks!
    Do you have a way to hide/remove the help button on the ITS which renders SAP transaction?
    May I explain more:
    We use ITS to access some R/3 t-codes.
    Some R3 transactions have a "help" button which is not wanted or desired.
    Could you tell how to remove or hide it?
    Thanks!

  • [Flex 4.5.1] How to remove focus from TextInput on mouse click outside of it?

    For me clicking outside of a TextInput should always remove focus from it, only only if you click on another TextInput or Button.
    I don't see any simple event like MouseEvent.MOUSE_CLICK_OUTSIDE - which would definitely simplify things.. I wonder why there isn't such event. Well anyway I can't find any other similar event and I can't figure out an easy way to do this. I also wonder why I couldn't find a solution to this on the web easily... Well anyway...
    Does someone know how to do that in a convenient way?
    Thanks!

    ok I understand why is that. For example I have a TextInput now where the user enters number through buttons which have mouseFocusEnabled = false, so the TextInput doesn't lose focus. But on a TabBar I had to set mouseFocusEnabled = true or when I switched between tabs -> switches between states, I could still type in the TextInput in the previous tab cause it didn't lose focus. Maybe TabBar's default value of that property is wrongly set to false.
    Anyway, not losing focus when clicking outside is still weird. Take for example this forum, if I click outside of the box I am currently writing this, I lose focus. It's how things usually work. And flex focus is designed to work backwards to what people are used to, no matter as I already pointed out I understand there are cases it comes in handly. I hope I don't sound bad but take it just as a suggestion please that maybe if it is redesigned like this: clicking on component gets focus, clicking outside loses focus. But if you click on a button for example and you want to keep the focus on a TextInput cause you add some text, you should be able to set a property on the Button like maintainCurrentFocus = true (false by default), which would make clicking on the Button not shift the focus to it or set it to null if the component is a group that has some rect background for example, but maintain the focus on the TextInput.
    I could be missing something about the current design of how the focus works in flex, but from my point of view at the moment, the design I describe to use is just like how I am usually used to be working with focus as a user, not as developer.
    Maybe you could agree or maybe you know some reason by which things are how they are at the moment that I don't see. But if you think I make sense please let me know, maybe I could fill a minor enhancement request for that ?

  • Unable to remove/hide help icon in Discussion Service OOTB

    Hi,
    Is there any way to remove/hide help icon from Discussion Service OOTB toolbar ?
    I am not able to find help icon tag in ListTopics.jsff and ListMessages.jsff fragment file.
    Regards,
    Fyaz

    Hi.
    I´m not sure but I think this Taskflow is a "black box" and is not possible customize it

  • How to remove focus from a Ring Control in a PDA application?

    Hello,
        In a PDA application, i have observed that when we select a pull-down Ring control, the focus is retained in the control and the text of the control appears highlighted. The only way out is to tap an empty portion of the PDA application screen to remove focus from the control. Is there any way to avoid this? Is there a method to remove focus from the control programatically?
    Note: Version of LabVIEW that we are using: LabVIEW 8.5 Professional Development System for Windows Vista/XP/2000 and LabVIEW 8.5 PDA Module for Windows Mobile.
    Thanks & Regards,
    Subhashini

    Hi Vsh,
        Thanks for ur response. Setting the key focus property node of the ring control to false removed the focus from the control. I guess it was a silly question (have started LabVIEW devp. recently).
    Thanks & Regards,
    Subhashini

  • Cuando quiero dar setup,  aparece: The feature you are trying to use is on a network that is unavailable, y: The older version of itunes cannot  be removed. Help!

    Yo des intale itunes en mi laptop. Tiempo despues instale el ultimo itunes alli mismo. Cuando quiero darle el setup,  aparece: The feature you are trying to use is on a network that is unavailable, y: The older version of itunes cannot  be removed. Help!
    The feature you are trying to use is on a network resource that is unavailable
    I give it ok, I get same msg.
    I give it cancel, then: The older version of ITunes cannot be removed. Please contact your tech support group.                 
    Please help I need this ..

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • ASA SSL Portal : Remove Application help

    Hello,
    I've done some customization on the SSL Web portal on an ASA 8.2.
    Everything's fine except I want to remove the help column on the right when I click on application.
    See the attachment the column entitled 'Terminal Servers Help'
    Regards

    Yes it works. so easy !
    Thanks much.

  • Remove focus from JButton?

    I am starting a new thread related to my previous thread.
    I came to realize that when I call a game object from the GUI menu by clicking on "New Game" button, the focus is set to the button. I found it by using the method, if(newButton.hasFocus()).
    However, my problem is not yet finished. I tried game.requestFocus(); also.
    But still, the focus is not removed.
    Can n e one pls let me know if there is a way to remove focus from the damn button?
    Thanks.                         

    button.setFocusable( false );Will pevent the button from maintaining focus.

  • Disable/remove F1 help

    I would like to remove F1 help functionality from SAP. May I know how to go about doing this? Better yet, is there a way to configure it such that whenever anyone hits F1, he will receive a customised message.
    Thanks for all the help!

    Hi Umesh,
    The modal dialog things just changes the format of F1 help display. Nothing else.
    Hello Rajesh,
    SR13 is for SAP help not inbuilt documentation.
    Hello Gordon,
    May be you need to check with SAP on this.
    Regards.
    Ruchit Khushu.

  • Remove focus from combobox

    Hi,
    Iam working with SAP B1 2007 .
    A combobox is populated with items.After the user selects the item in it,the focus must be removed from that combobox control to next textbox control.Can anyone suggest me what can I do for this.
    Thanks In Advance

    Hi ,
    Catch the event combo select and then emulate a click on the text control
    using
    oform.Items.Item("textControl").Click
    regards
    Edy

  • Set border color of editable ComboBox on focus

    What I want to do, is set BorderBrush of editable ComboBox. I'm using slightly modified default WPF templates. They are structured like below:
    <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
    <Grid x:Name="templateRoot" ...>
    <ToggleButton x:Name="toggleButton" ... />
    <Border x:Name="border" ...>
    <TextBox x:Name="PART_EditableTextBox" ... />
    <!-- textbox with IsFocused property which should be focus trigger -->
    </Border>
    </Grid>
    </ControlTemplate>
    ToggleButton template:
    <ControlTemplate TargetType="{x:Type ToggleButton}">
    <Border x:Name="templateRoot" ...> <!-- first border brush I want to set on focus -->
    <Border x:Name="innerBorder" ...> <!-- second border brush I want to set on focus -->
    <Border x:Name="splitBorder" ...>
    <Path x:Name="arrow" ... />
    </Border>
    </Border>
    </Border>
    </ControlTemplate>
    And now, what should happen.
    When PART_EditableTextBox.IsFocused is equal to true then set
    templateRoot.BorderBrush and innerBorder.BorderBrush to another color (for example red and blue).
    It would be very simple if there was only one BorderBrush to set, because I could use
    TemplateBinding to bind this property to ToggleButton element.
    For me, the problem are nested templates. I don't know how to refer to inside of another template.
    I hope you can help me.
    It would be very good if I didn't need to use C# code, just XAML.

    >>I don't know how to refer to inside of another template.
    You cannot. But since the PART_EditableTextBox is part of the ControlTemplate of the ComboBox you could add the trigger to this control template and then for example set the BorderBrush property and the Background propery of the ToggleButton and bind these
    to the BorderBrush properties of the Borders in its ControlTemplate:
    <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
    <TextBox x:Name="PART_EditableTextBox" ... />
    <ToggleButton x:Name="toggleButton" ... />
    <ControlTemplate.Triggers>
    <Trigger Property="IsFocused" Value="True" SourceName="PART_EditableTextBox">
    <Setter Property="BorderBrush" TargetName="toggleButton" Value="Red"/>
    <Setter Property="Background" TargetName="toggleButton" Value="Blue" />
    </Trigger>
    </ControlTemplate.Triggers>
    <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="ClickMode" Value="Press"/>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ToggleButton}">
    <Border x:Name="templateRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="2">
    <Border x:Name="innerBorder" BorderBrush="{TemplateBinding Background}" BorderThickness="2">
    <Border x:Name="splitBorder">
    <Path x:Name="Arrow" Data="{StaticResource DownArrowGeometry}"
    Fill="Black" HorizontalAlignment="Center" Margin="0,1,0,0" VerticalAlignment="Center"/>
    </Border>
    </Border>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    If you don't want to use the Background property for this, the other option is to create your own custom class that derives from the ToggleButton class and add a dependency property called "InnerBackground" or something to this class and replace
    the ToggleButton with your custom ToggleButton and replace the binding to the Background property with a binding to the new dependency property and set this one in the control template for the ComboBox.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and/or helpful and please start a new thread if you have a new question.

  • Problem removing focused object from a table

    Hi.
    I have a problem removing a component that is focused from a table. The
    whole row is removed except a single component (JSpinner) in one row.
    My table has three columns, the first two are String fields
    (not editable) and the last is a JSpinner. Since there is no
    Default cell renderer or cell editor for JSpinner I had to
    create them.
    So, if no element of the row is focused then calling the function:
    public void clearTable() {
    setVisible(false);
    dataVector.removeAllElements(); // clear data vector
    setVisible(true);
    works just fine
    but if a spinner in a row is focused them that spinner is left alone "floating" on an otherwise empty table.
    Questions:
    1) Any one has an ideia of what might be the problem?
    2) Do I have to play with Focus to solve this? (hate the idea,
    since always been told to avoid messing with focus, because
    of the problems it normally brings)
    Thanks in advance for the help,
    Rgds,
    Jorge

    The problem is that you need to properly stop the editing operation first.if( myTable.isEditing() ) {
        // If you want to throw away any edits use...
        myTable.getCellEditor().cancelCellEditing();
        // If you want to apply any edits, then end use...
        myTable.getCellEditor().stopCellEditing();

  • Camera stopped focusing -- help?

    I've had my Droid Charge for a little over a year.  A little while (~6 weeks?), the camera stopped focusing.  It is locked in closest possible focus.  My guess would be it's locked in macro mode, switching between macro, and face-focus, and autofocus makes no difference.  Touching a place on the picture to ask the camera to focus there has no effect.
    I installed Ultra Magnifier a while ago, and wonder if it somehow screwed up a setting.  Uninstalling it hasn't changed anything, so don't know whether the camera problem is related to Ultra Magnifier or not. 
    I don't use the camera a lot, so at first assumed this was just one of those temporary glitches that I commonly have with my phone (like it will lock up, or refuse to answer, or something).  Can't tie the problem to any other event (like installing a particular app).
    Re-setting the phone, then setting it up again, is more of a hassle then I'm willing to put up with just to get the camera to work.  I have other pocket cameras that always take better pictures than my phone anyway.
    Help?
    <<  Discussion of rooting removed as a violation of Verizon Wireless Terms of Service >>
    Message was edited by: Verizon Moderator

    Angelsix,
    On my Charge PHONE camera when I touch the screen to pre-focus it focuses, turns the focus Square from white to green, and gives a beep when it is focused.  It takes about 4-6 seconds until this happens.
    BUT I also found that pre-focusing is not necessary because whenever I touch the camera icon to take a photo the camera FIRST focuses on the area in the white square, turns it green and gives the same beep denoting focus.  Then it takes the photo.  This means that if you have moved the white square away from where you pre-focused you have just lost that pre-focus.
    Now if you want to point the camera on an object in the middle of the screen BUT you would like the focus to be on a persons face or an object on the right or left of whatever is in the middle just touch that area but it takes 4-5 seconds for it to pre-focus but don't move the camera's white square  away from the area you just pre-focused.
    I find it easier to point the camera directly at a persons face and, forget the pre-focus, just take the picture because when you take the photo the camera does BOTH the focus and the picture taking.
    I think with this "little" camera you might be happier if you set the FOCUS MODE to AUTO FOCUS and METERING to SPOT so the main focus is where the white square is located.
    JerryF

Maybe you are looking for