Treeview, keep focus on clicked node ?

First post here, hope I am in the right location.
I am using Visual Studio Express 2103 for web. On my asp page I have a Treeview with 4 Levels. From sql server I load the hierarchy as
TopLevel-->
                  Product-->
                                   Keyword-->
    Article
User would click on product, then view a list of all keywords, click on the keyword and then see a list of all articles with this keyword, when the article is clicked, the related information will be shown in various text boxes to the right of the tree.
The problem I have is that when I scroll down the list on my web page, and click any nodes that are more than 1 page down, the focus (for lack of a better word) jumps to the top of the page, now I have to scroll all the way down to the node clicked.
How can I prevent all of this scrolling and keep the focus on the last clicked node, whether it is on the first or the tenth page.
Thank you in advance.

Thanks, I have done this before in regular VBA but unfortunately selectednode property is read only in ASP.
I have since posted up in the ASP.net forum here
asp.net
Hi Andre,
Since you have got where to get supports for asp.net issues, I would recommend you focus on that thread to get help.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • JFrame not keeping focus

    How can I ensure that a JFrame will always keep focus?. I need it to always remain on top and be visible
    thanks

    A tricky one.
    Java doesn't allow this. Not even the upcoming version 1.4 allows this.
    I have done it, though and many people on this forum have. What you need to do is go native. If you are on the Windows platform write a JNI (Java Native Interface) compliant DLL and call it from your code using the native keyword. If you want some code write me at [email protected]
    Morten Hjerl-Hansen

  • Keep focus in a control until certain conditions are met?

    Hello,
    Is there a way to keep focus at a control until certain conditions are met?
    For example, if I might want to keep the focus set to a text field inside a tab unless the text field contains something valid.
    If user tries to switch to different tab without having valid text inside the text field, I would like to pop up a stage/dialog and abort the tab switching.
    Please help!
    Thanks.

    Hi. Here is an example:
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.layout.*;
    import javafx.scene.paint.Color;
    import javafx.stage.Modality;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import javafx.stage.WindowEvent;
    public class SSNValidation extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(final Stage primaryStage) {
            primaryStage.setTitle("SSN Validation");
            Button btn = new Button();
            final TextField tfSSN = new TextField();
            StackPane layout = new StackPane();
            Scene scenePopup = new Scene(layout, 424, 154, Color.TRANSPARENT);
            final Stage stage = new Stage();
            stage.initModality(Modality.APPLICATION_MODAL);
            stage.setScene(scenePopup);
            stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
                @Override
                public void handle(WindowEvent event) {
                    tfSSN.requestFocus();
            tfSSN.focusedProperty().addListener(new ChangeListener<Boolean>() {
                public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, final Boolean newValue) {
                    if (!newValue) {
                        if (tfSSN.getText().length() < 9) {
                            stage.show();
            final TextField tf2 = new TextField();
            btn.setText("Submit");
            VBox root = new VBox();
            root.getChildren().addAll(tfSSN, tf2, btn);
            primaryStage.setScene(new Scene(root, 300, 250));
            primaryStage.show();
    }

  • Menus popping and keeping me from clicking/Safari wants login all the time

    I bought this iMac in Jan. I suffered through viruses and hacking with four XP's. I bought a Mac so as to never be in that **** again. Well I've been reading sysprofile logs and watching the records of apps I've never used. Today I saw fax verifications when I've never sent nor received one. My folders and files change all the time. For example, right now my desktop is covered in all the logs I saved and filed in my documents files. When I open them, presto magic, the info I saved has changed to something else. Sometimes as many as 30 files pop open one by one on the desktop while iTunes plays the song Crazy. I am not making this up. Since I am new to iMac I didn't even recognize that someone had used Grab to put a picture of "share folders" with a "start" button in the middle of my desktop and it cannot be deleted. I know you think it's because I'm a novice, but, believe me, I got enough ed with those XP's to work for Microsoft. I called Apple and told them that I either need a white hat hacker or a priest to fix this baby. I mean I don't even know how to begin to tell someone over the phone all the things this crazy machine does. But for now, since I am trying to continue my online biz, I only ask that someone please, for the love of God, tell me 1) how to stop the pop-up menus that keep me from clicking anywhere--the menus don't even make sense or even remotely apply to what I'm doing. It's a pointer fight at every click. I have gone over sys prefs a hundred times. And, 2) how to keep Safari from popping a menu down every few minutes asking for a new kind of named login no matter how I change the keychain. Yes, everything is locked up tight. No one shares or has access to my computer, and yet Big Bang is saying "Goodnight" to me and I've never played it or even knew I had it. I read a lot of pages in this forum and read a lot of familiar sounding stuff. I feel so overwhelmed, disappointed and depressed. Thank you.
    iMac   Mac OS X (10.4.9)   I'm sorry this is long. I feel desperate because you should see the notebooks I already have.

    Andropov14-
    Try unplugging your WiFi router for a few seconds.
    Fred

  • IPhone 4 keeps focusing and refocusing in video

    When shooting video with my iPhone 4, the image keeps focusing and refocusing as I move the camera causing the picture to pop in and out of focus. It's happening in all video apps so I'm suspecting the phone.
    Ideas?

    Basic troubleshooting steps clearly outlined in the User Guide are restart, resest, restore from backup, restore as new.
    If you still have problems after going through ALL the recommended troubleshooting steps, then you likely have a hardware issue.  You'll need to bring your phone into Apple for evaluation.

  • Is it possible to change TreeView's background color, not node color?

    In advance, Thanks!!
    Actually, I've made my own treeview in my project. and  I've changed my treeview node color as i want
    I wonder whether or not to change treeview's background color, not node color in below class.
    // in ~.fr
    Class
      kMyTreeViewWidgetBoss,
      kTreeViewWidgetBoss,
         IID_ICONTROLVIEW,                    kMyTreeViewCtrlViewImpl,  
         IID_ITREEVIEWWIDGETMGR,      kMyTreeViewListBoxWidgetMgrImpl,
         IID_ITREEVIEWHIERARCHYADAPTER,  kMyTreeViewListBoxHierarchyAdapterImpl,
         IID_ISTRINGLISTDATA,                          kStringListDataImpl,
         IID_IOBSERVER,                                  kMyTreeViewCtrlBoxObserverImpl,
    type MainTreeViewListBox(kViewRsrcType)       : TreeViewWidget    (ClassID = kMyTreeViewWidgetBoss)  {};
    MainTreeViewListBox   //Tree view
               kMyTreeViewWithTextListWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
               kBindAll,           // Frame binding
               Frame(-1, 26, 300, 276)  // Frame
               kTrue, kTrue,         // Visible, Enabled
               kTrue,       // EraseBeforeDraw
               kInterfacePaletteFill,   // InterfaceColor
               kHideRootNode,// | kDrawEndLine, // Options. Display root node
               kFalse,  // Use H Scroll bar
               kTrue,  // Use V scroll bar
               20,   // fVScrollButtonIncrement
               20,   // fVThumbScrollIncrement
               0,   // fHScrollButtonIncrement
               0,   // fHThumbScrollIncrement
               2,   // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
               kFalse,  // Allow children from multiple parents to be selected
               kTrue,  // Allow discontiguous selection
                //The tree view is dynamically created. 
    class MyTreeViewCtrlView : public PanelView
    virtual void   Draw(IViewPort* viewPort, SysRgn updateRgn);
    void MyTreeViewCtrlView::Draw( IViewPort*  viewPort, SysRgn  updateRgn )
       AGMGraphicsContext gc(viewPort, this, updateRgn);
      InterfacePtr<IGraphicsPort>  gPort(gc.GetViewPort(), UseDefaultIID()); // IID_IGRAPHICSPORT);
      ASSERT(gPort);
      gPort->gsave();
      PMRect frameOut      = GetFrame();
      frameOut.MoveTo(0, 0);
      COLORREF crBackColor    = RGB( 255, 0, 0 );
      gPort->setrgbcolor( GetRGBtoReal( GetRValue(crBackColor) ), GetRGBtoReal( GetGValue(crBackColor) ), GetRGBtoReal( GetBValue (crBackColor) ));
    gPort->rectpath(frameOut);
    gPort->fill();
    gPort->grestore();
    PanelView::Draw( viewPort, updateRgn );
    In above case, there are errors in kMyTreeViewCtrlViewImple when Indesign is launching.
    // Error Assert
    XferObject- ReadWrite for impl kMyTreeViewCtrlViewImpl of iid IID_ICONTROLVIEW in class kMyTreeViewWidgetBoss read wrong amount in plugin kMyTreeViewWidgetBoss
    but, in kMyTreeViewWidgetBoss ClassDescriptionTable, when remove this( IID_ICONTROLVIEW, kMyTreeViewCtrlViewImpl), that's ok. but I can't change background color. just interfacepalettefill color
    Please help me!!

    Here's a sample!
    That's all.
    #define GetRGBtoReal( X )   (double) X / (double) 255.f
    COLORREF crBackColor    = RGB( 255, 0, 0 );
    gPort->setrgbcolor( GetRGBtoReal( GetRValue(crBackColor) ), GetRGBtoReal( GetGValue(crBackColor) ), GetRGBtoReal( GetBValue(crBackColor) ));

  • JFileChooser in Applet keeps focus after selection of a directory

    I have spent several days on the following issue, but haven't found any solution so far...
    When I open a JFileChooser out of an Applet and select a Directory, the FileChooser closes as expected, but a text field located on the main applet pane cannot be selected any more (the mouse pointer goes to "text cursor" style when hovering over it, but the text field does not get the focus when clicked). Strangely, the other button on the same pane still reacts to mouse clicks. This happens only when I select a directory, but not when I choose a file. Also, it does not happen, when I click "Cancel" instead of "Open". Furthermore, the problem occurs only using the Firefox plugin, not in the AppletViewer. I even tried to remove the text field from the root pane and add a new one after the file chooser execution, but still it won't regain focus.
    Here's the stripped-down code:
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class TestApplet extends JApplet {
        private static final long serialVersionUID = 1L;
        @Override
        public void init() {
            final JPanel rootPanel = new JPanel();
            rootPanel.setLayout(new BorderLayout());
            getContentPane().add(rootPanel);
            final JButton fileChooserButton = new JButton("Start");
            fileChooserButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    JFileChooser fc = new JFileChooser();
                    fc.setAcceptAllFileFilterUsed(false);
                    fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                    fc.setMultiSelectionEnabled(false);
                    fc.showOpenDialog(rootPanel);
            JTextField textField = new JTextField();
            rootPanel.add(fileChooserButton, BorderLayout.CENTER);
            rootPanel.add(textField, BorderLayout.SOUTH);
    }And this is the applet.html:
    <applet code="TestApplet.class" codebase="file://home/administrator/workspace/Test/bin" width=100 height=50></applet> This concerns: Ubuntu 9.04 / Firefox 3.6.9 / JVM 1.6.0_20
    Any help or ideas for a workaround would be much appreciated...

    AndrewThompson64 wrote:
    JWS was available as a separate download since Java 1.2. It became bundled with the JRE around 1.4.2, not sure of the micro-version, but it was in the 1.4 era. 1.4 has been relegated to the 'obsolete' pile now, so I think you are safe expecting the end user to be prepared to update to 1.5+ if needed.You don't know my grandma: she isn't prepared to anything, but she wants things to just work ;-)
    For ensuring the user has a minimum of 1.5, see the [Java&#153; Rich Internet Applications Deployment Advice|http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html] for details of the deployJava.js script. It is useful for both applets and apps. deployed using JWS.
    Yes, I already use this script for my Applet, but I hadn't realized that it worked for JWS as well.
    Do you mean like a corporate intranet?Exactly. Another example could be centrally managed laptops connecting over Internet to your application (like the traveling salesman connecting to his task planner)
    ... Can you do a search of the bug DB and if nothing shows up, submit one? The only chance these things will get fixed is if they are reported.I agree with you on that question and I've already had a look (didn't find anything so far)
    Embedded applets are a PITA. I wouldn't disagree, but again, if you want to bring a rich client to the masses, sometimes that's the way to do it (unless you go for ActiveX, which is definitely not an option for me). Anyway, I'll give JWS a try.. and then I'll ask the customer help desk if it was a good idea...
    For example, is there any programmatic way to determine if the embedded applet is not acting as expected? If so, monitor that and on detection, pop a dialog to the user explaining the situation and offering the free floating version from a button click.Well, I have to think a bit more about this. Probably I will just to check if the text field gets the focus after a mouse click, by adding some kind of test inside a MouseListener. If it doesn't get the focus, I would be quite sure that there's a problem... I'll look into this.
    On the other hand, to work around the whole problem, I have found some Open Source Directory Chooser (http://sourceforge.net/projects/jfolderchooser), which looks nice at a first glance, but I didn't have the time to go into it in more detail. I'll just quote you here:
    I cannot say if this will fix the problem. Or perhaps it will fix the problem in that browser/JRE combo., but break it in another. ;)Words full of truth :)

  • Can't turn off my ipod, just keeps spinning and clicking

    I have a 40GB click wheel ipod, about 1 year old. I just tried to update my playlist, but my computer couldn't recognise the ipod. I tried to reset it, but now all it says is "Disk mode, OK to disconnect", but the little hard drive keeps spinning and clicking and I can't turn it off. It doesn't matter if it is connected or not to the computer. Any help please? Thank you.

    Mary PS,
    I had the same problem with my iPod, sad iPod icon/www.apple/support/ipod, and I tried many times to reset/restore, but nothing would work and the enitre time I could hear the hard drive cycling.....and I figured well hit it with a ball peen hammer cause it is going back to apple regardless....sure enough "whumped" it into the palm of my hand and I was able to reset/restore it......This can't be the answer, can it? Is there physical damage and that is why the hard drive was "cycling"? What does Apple recommend that I do?
    thanks
    Tim

  • Keep focus and actionlistener

    I open as a popup a custom JPanel but
    I want to keep focus and actionlistener on it
    while it is opened.
    is there a way?
    thanks for any clue

    I tried removing all the pattern validations on the field and added this below code in the validate event of the text field and it works..
    var strCode;
    var f = /^([A-Z]{2}[1-9]{5}[A-Z])$/;
    if(this.rawValue != null && String(this.rawValue) != "") {
                        strCode = String(this.rawValue);
                        if (f.test(strCode) == false) {
                                            xfa.host.messageBox("Invalid pattern!");
                                            xfa.host.resetData();
                                            xfa.host.setFocus(this);
    xfa.host.setFocus(this);

  • Phone keeps making a clicking noise while I am on calls

    phone keeps making a clicking noise while I am on calls

    Is it constantly beeping or is it beeping when you place it on the touchstone? If you place it on the touchstone and it beeps this is expected behavior. Also note that you could be bumping the device shifting it off the charger and then back on thus the beeping noise telling you that it has been realigned again properly and is charging properly.

  • APEX Tree.  Keep focus on expanded leaf node.

    How do I prevent my tree from jumping back to the top when I expand a leav node that is below the screen scroll. I have a single parent of CORP with about 30 leaf nodes as its direct children. I have to scroll down to expand a node towards the bottom of the list. When I scroll down and expand, the page refreshes and jumps back to the top so now I have to scroll down again to expand the next node, etc. My current Tree Qurey is like
    select CHILD_ID id,
    PARENT_ID pid,
    CASE WHEN CHILD_ID = :P23_TARGET THEN
    CASE WHEN :P23_STATUS = 'Target Up' THEN
    '<span styl="color:green;">' || ITEM_NAME || '</span>'
    ELSE ITEM_NAME
    END
    ELSE
    ITEM_NAME
    END name,
    'f?p=&APP_ID.:23:'||:SESSION||'::NO::P23_TARGET:'||CHILD_ID link,
    null a1,
    null a2
    from CORP_SVR_HRCHY_VW

    Hi,
    You have to use the Anchor ID functionality of a browser - this allows you to add #id to the end of the url where id refers to the id attribute of the item that should receive the focus when the page is reloaded.
    As an example: [http://apex.oracle.com/pls/otn/f?p=33642:200]
    This, of course, requires a bit of setting up, but is easily doable.
    For this example, my SQL statement for the tree is:
    SELECT 1 ID, NULL PID, 'Top' NAME, NULL LINK, NULL A1, NULL A2 FROM DUAL
    UNION ALL
    select "EMPNO" id,
           1 pid,
           "ENAME" name,
           'f?p=' || :APP_ID || ':200:' || :APP_SESSION || '::::P200_EMPNO:' || EMPNO || '#node' || EMPNO link,
           'node' || EMPNO a1,
           null a2
    from "#OWNER#"."EMP"You will note that the URL contains *'#node' || EMPNO* at the end of the link - for an EMPNO of 1234, this would add *#node1234* to the end of the URL. You will also note that I've added *'node' || EMPNO* to the A1 column - whatever I add into this column becomes available for use in the output by referencing it as #A1# in the template. On the tree's template definition, wherever there is an A tag, I've included:
    ID="#A1#"as an attribute of the tag. For example, on the "Name Link Anchor Tag" setting, I have:
    &lt;a href="#LINK#" ID="#A1#"&gt;#NAME#&lt;/a&gt;and, wherever #A1# appeared outside of an A tag, I have removed it (otherwise, the "node1234" text would appear at that point in the page).
    Andy

  • Removing focus from a node

    I have a frame in which a scrollpane hold a jtree.
    I picked up the following code from the forum for making sure that only when the right click is on a node, the popupmenu is displayed.
    public void mouseReleased(MouseEvent e) {
                if (e.getButton() == MouseEvent.BUTTON3) {
                    TreePath closestTreePath = tree.getClosestPathForLocation(e.getPoint(), e.getPoint());
                    if (closestTreePath != null) {
                        tree.setSelectionPath(closestTreePath);
                         // select the row in the tree for the path
                        selectedRow = tree.getRowForPath(closestTreePath);
                        YourNode node = (YourNode) closestTreePath.getLastPathComponent();
                       // assuming your popup menu is already created somewhere else
                       popupMenu.show(deviceTree, pt.x, pt.y);
                        selectedRow = -1;
    }by codecraig
    But now the problem is that whenever i do right click anywhere on the tree a node gets selected and the popupmenu is displyed. i want to display the right click is on the node.
    here is my code
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.event.*;
    public class tree_right_click
         //JPopupMenu popupmenu = new JPopupMenu();
         JTree mytree;
         SysPopupListener s = new SysPopupListener();
         public tree_right_click()
              DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
              DefaultMutableTreeNode l1 = new DefaultMutableTreeNode("level1");
              DefaultMutableTreeNode l2 = new DefaultMutableTreeNode("level2");
              mytree=new JTree(root);
              mytree.addMouseListener(s);
              root.add(l1);
              l1.add(l2);
              JScrollPane treeview = new JScrollPane(mytree);
              JFrame fr = new JFrame("My Frame");
              fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              fr.getContentPane().add(treeview);
              fr.setSize(300,300);
              fr.setVisible(true);
              public static void main(String args[])
              new tree_right_click();
    class SysPopupListener extends MouseAdapter
         JPopupMenu popupmenu = new JPopupMenu();
         SysPopupListener()
              JMenuItem part = new JMenuItem("Add detail 1");
              JMenuItem part2 = new JMenuItem("Add detail 2");
              part.addMouseListener(this);
              part2.addMouseListener(this);
              popupmenu.add(part);
              popupmenu.add(part2);
         public void mousePressed(MouseEvent e)
              maybeshowpopup(e);
         public void mouseReleased(MouseEvent e)
              maybeshowpopup(e);
         void maybeshowpopup(MouseEvent e)
              if(e.isPopupTrigger())
                   JTree t = (JTree)e.getComponent();
                   TreePath closestTreePath = t.getClosestPathForLocation(e.getX(), e.getY());
                if (closestTreePath != null) {
                    t.setSelectionPath(closestTreePath);
                     // select the row in the tree for the path
                    int selectedRow = t.getRowForPath(closestTreePath);
                    DefaultMutableTreeNode n = (DefaultMutableTreeNode) closestTreePath.getLastPathComponent();
                    System.out.print(n);
                   // assuming your popup menu is already created somewhere else
                    popupmenu.show(e.getComponent(),e.getX(),e.getY());
                    selectedRow = -1;
    }Please help,
    thanks in advance,
    Puneet

    I made some changes to your code and seems to be working like this:
              if(e.isPopupTrigger()) {
                   JTree t = (JTree)e.getComponent();
                   TreePath closestTreePath = t.getClosestPathForLocation(e.getX(), e.getY());
                   if (closestTreePath != null) {
                        t.setSelectionPath(closestTreePath);
                        // select the row in the tree for the path
                        int selectedRow = t.getRowForPath(closestTreePath);
                        DefaultMutableTreeNode n = (DefaultMutableTreeNode) closestTreePath.getLastPathComponent();
                        System.out.print(n);
                        // assuming your popup menu is already created somewhere else
                        popupmenu.show(e.getComponent(),e.getX(),e.getY());
                        selectedRow = -1;
                   JTree t = (JTree)e.getComponent();
                   TreePath path = t.getPathForLocation(e.getX(), e.getY());
                   if (path != null) {
                        popupmenu.show(e.getComponent(),e.getX(),e.getY());
              }

  • PDF Keeps Focus Till Closed

    Situation:
    I launch my site to a full window lacking any browser
    navigation. Let's call this window the "main window". I do this to
    control how the site is navigated. I use the javascript popup
    window code with no problems. I now need to do a link to a PDF
    document on another website, and I don't want the main window to
    close. I can easily create this link by using the getURL and
    opening the PDF in its own window (_blank). However, if a viewer
    clicks anywhere outside the PDF, then the PDF loses focus and goes
    behind my main window. They would have to know how to use the alt +
    tab to view the PDF which will NEVER happen with my viewers nor do
    I want them to have to do this.
    Code:
    on (release) {
    getURL("
    http://web03.fahc.org/xpedio/groups/public/documents/fapolicy/anes2.pdf",
    "_blank");
    Question:
    Is there a way to get the PDF to keep the focus until the
    viewer closes the PDF?
    Thanks,
    KJM

    Use setModal(true)
    Denis

  • Keep focus in the same window after opening a new window per key-event

    I have an application in which user can press on a specific key, and that opens a new window in a JFrame. User might want open a few of such windows in a row by changing the cursor position and pressing the same letter key. But the problem is that with every new window Java VM transfers the focus to that new window. User is forced either to click to regain focus, or to move the mouse out-and-in the window, in which case the focus returns to it as well, assuming the X11 style of focus by cursor position of course.
    Is there any way to keep the focus with the window on which the cursor is placed?

    In your ActionListener your code should be something like:
    JFrame anotherOne = new JFrame();
    anotherOne.setVisible(true);
    originalFrame.requestFocusInWindow();If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://sscce.org], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • TextField keeps focus

    Hi,
    I have the following problem:
    On my stage sits a MC: personTab.nameBase. Inside the
    nameBase clip there are 10 input fields named input## (numbered
    from 0 - 9).
    When I click one of these fields the cursor starts blinking
    in the field which is clicked. This is OK, but the problem is that
    the field doesn't loose focus unless a component is clicked
    (radiobutton, combobox etc.).
    I put in a listener to trace what happens:
    In the onSetFocus event I get the target of the clicked field
    and when I click the mouse somewhere on stage (where no component
    is placed I get null as a target, but when I release the
    mousebutton, the last selected field receives focus again and the
    target of the field is returned again (instead of null). The
    onKillFocus event doesn't return a thing. I already tried handling
    the focus in the onSetFocus event in the following manner:
    var clip:Array = newFocus._name.split(".");
    if (substring(newFocus._name, 1, 5) == "input") {
    var clipID:String = substring(newFocus._name, 6,
    newFocus._name.length);
    _global.activeField = clipID;
    } else {
    if(!newFocus._name){
    //remove focus from textFields
    Selection.setFocus(null);
    delete _global.activeField;
    But there is no response to Selecion.setFocus(null), the last
    selected input field keeps getting focus after the mouse is clicked
    on somewhere else on stage (but not on a component, or other text
    field).
    I hope someone can help me out. Thanks in advance.
    Best regards,
    Rick.

    onRollOver (your button) you store the begin and end index of
    the Selection (in the textfield), onRelease(of your button) you set
    your red textFormat on the previously stored indices, then you set
    Selection.setSelection back to what it was...

Maybe you are looking for

  • How can I force an app install in App Store, or otherwise get App Store in a consistent state?

    I've recently reinstalled OS X Mountain Lion on a laptop (completely and thoroughly erased the partitions of the previous installation), and on this freshly created system, after I sign in to the App Store (to download previous purchases), the system

  • Multiple email accounts got synced on accident  when I synced with .Mac

    Yesterday when I did the sync with my .Mac account it gave me a warning that it was going to update alot of emails... thinking nothing of it I said yes. What I did not realize it that it synced all of my roommates email accounts and contacts that he

  • Applications that sync with the Curve?

    Are there any other applications available ( free or not ) to sync the memo pad, tasks and calendar OTHER THAN Microsoft Outlook? When I tried to configure and synchronize my BB 8330 Curve so i can transfer stuff from my computer onto my memo pad or

  • External Monitor Frozen

    I am trying to lay off a simple DV video to tape. When I play the timeline the picture is frozen. When I stop the timeline the picture updates to the current frame. I have done this many times before with other systems without this problem. This is a

  • Source system connection

    Dear BW mates, When i try to make a connenction from BW to a source sytem i get the following message: R/3 System does not allow any changes to be made to object IDOC ZSBE068. I think that the suggestion for a solution by SAP blow doesn't help anway.