ListView selected item problem in a sheet.

Hello

In my main.qml, I have a listview using the standardlistitem.

I have a popup menu attached to the standardlistitems.

Now, initially, I had a problem of selection of a list item when I called one of the options in the context menu of the element. The element does not get selected when you make the menu appear.

To solve this, I use the onTriggered signal from the context menu to call select on the listview. He calls the onSelectionChanged listView itself signal.

Now here is my problem:

If I call a function c ++ this signal of the main.qml and in this c function onSelectionChanged ++ I call the funtion selected() on ListView to obtain the row function works correctly and the index is returned.

But if I have everything first to make a visible sheet and call the function c ++ within the call to selected() worksheet returns nothing.

There is nothing in my qml or CPP which clears the selection, this occurs by default or something when the worksheet is opened?

THX.

* beep * bad forum, I have no idea why I did it!

IM opening a new post in the forum of cascades and put to resolved.

Tags: BlackBerry Developers

Similar Questions

  • Change the background color for a selected item in a ListView?

    Hello

    No idea how to change the color of tbackground of a ListView selected item to blue for a different color?

    I tried wrapping the ListView in a container, then by changing the background color of the container, but it does not work. And ListView, nor the ListItemComponent takes a background attribute.

    Thank you

    Oh, I did that last night.
    Thus, in the container for StandardItem, add this line:

     background: ListItem.selected || ListItem.active ? Color.create("#4D9EC9") : Color.Transparent
    

    and onTriggerred of the signal, add two lines:

    // for highlighting
    listView.select(indexPath, true);
    
    // for clearing highlight
    listView.clearSelection();
    

    PS: listView is the id of the ListView

    ListView {
        id: listView
    ....
    
  • selected item is not currently available

    Some of the videos - everything (with NBC News) cannot be seen:

    "The selected item is not currently available.

    El Capitan 10.11.6, Safari.

    At the same time, that these videos are available at the same place using Chrome Firefox for mac.

    It's NBC or Safari?

    Luke

    Most likely Safari...

    Part of the problem may be due to cookies from Safari.

    Go to Safari > Preferences then select the Privacy tab, then click on remove all data from the Web site and exit then restart Safari.

    If this does not help, you may need to update Flash.

    Open system preferences > Flash Player > updates > check now

  • Cannot select items from menu top 25% of the window of the browser most of the time.

    Running Windows 7 Pro, on a new HP Ultrabook (2 months) with FF 15.0.1. Several times, selectable items work not, but usually in the 20-30% of the browser window. With the pointer hovering over selections, it does not change to indicate a selectable element, or if it will allow you to select. It happens on sites such as Yahoo!, HP, etc. He doesn't do it all the time, but I'd say at least 50% of the time, even if you reload the page and allow all sites with NoScript. There is no warning of filtering.

    You are welcome.

    Please let us know the name of the extension of the problem because it helps others.

  • When I press email and attach the photo, my email 'box' does not appear as formerly, and still on the bottom of the screen it says "1 selected item."

    When I press email and attach the photo, my email 'box' does not appear as formerly, and still on the bottom of the screen it says "1 selected item."   And I also waited for a period of time as well very reasonable.  What can I do?

    original title: EMAILING A PHOTO OF "LIBRARIES/IMAGES".

    Hi BrianS.OR,

    1 are you referring to the client program webmail or email?

    2. what e-mail on the computer client program do you use? Is - this Windows Mail or Windows Live Mail?

    3. What size are the image files?

    4. did you of recent changes on the system?

    You can temporarily disable a security software and firewall installed on the system and check if the problem persists.

    Note: Be sure to enable the security software on the computer after checking.

    Hope this information is useful.

  • How to detect when the selected item ObjectListField changed?

    I expanded the ObjectListField to implement a scroller of marquee style iPod for long lines of text that will disappear from the screen. So far, I have everything works well, and it works as I expect... when it fires.

    I'm having a problem to find a way to make reliable activate. It doesn't seem to be any method I can substitute or any earpiece I can use that fires when the current list item is changed. I first tried setSelectedIndex substitution. That worked sometimes, because apparently the OS is not call setSelectedIndex when he wants to change the item selected, it does something else.

    Then I tried the substitution of navigationMovement and manually call the code to start the timer, but that no longer works (I was the substitution of method navigationMovement of the ListField, maybe I should have done the Manager instead?). But anyway this approach does work for the version of the storm of my application because the storm never calls navigationMovement.

    Then I tried to use a fieldChangeListener, but apparently who don't get fired for the selection.

    Finally in despiration I tried substitution of drawListRow, only qualifying when index equals the selectedRow. But my code of scroll calls invalidate, so of course it just causes a loop infinite drawListRow, slow down the device and not even starting the scroll, because whenever the timer is started, it cancels the old one.

    Anyone have any ideas on what I can do here? Thank you.

    Good end I could not fieldChangeNotify to the fire, no matter which I overrided, even with the first setting the listener. It only seems fair to shoot during the selection change event. One thing to note, I use an objectlistfield, not an ObjectChoiceField... maybe you are thinking as well to another area?

    Thanks for the help anyway, in the end I was able to get the desired effect by modifying the code slightly to reuse the same animation timer rather than create a new one when the selected item changes. The timer is started in the constructor of the ListField. Works very well.

  • Selected item

    This code draws my list (ListField)

    County declared as public

    for (int count = 0; count< tabname.length;="">

    {

    colourList.insert (count);

    this.insert (tabname [count], count);

    }

    When I click on each item in the list, I want to go back to a window with a (name) element selected. To do this, I m using this code.

    protected Boolean navigationClick (int status, int time)

    {

    Field = this. getFieldWithFocus();

    if (field instanceof ListField)

    {

    dnom = tabname[count];

    UiApplication.getUiApplication () .pushScreen (new Fileid());

    UiApplication.getUiApplication () .popScreen (getScreen ());

    return true;

    }

    return Super.navigationClick (status, time);

    }

    Now if I select any item in the list I get a last element. In motor to solve my problem, I need just to retrieve the index of the selected item. Help please.

    now works

    I got back the index

    Count (field) = .getSelectedIndex () (ListField);

  • How to change the background color of selection of the selected item in the drop-down box of choice?

    How to change the background color of selection of the selected item in the drop-down box of choice?

    By default, the selection background color like 'blue', but if I want it to be "yellow" for example, how should I do?

    Thank you

    The id is applied by (I think) the skin of the ChoiceBox class. You don't need to define.

    You must apply the css in an external style sheet. You can apply the external style sheet to any parent of the box of your choice, or on-site (the most usual way to do it).

    Example:

    import java.util.ArrayList;
    import java.util.List;
    
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class ChoiceBoxTest extends Application {
    
      @Override
      public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("Example 2");
    
        final ChoiceBox choiceBox = new ChoiceBox<>();
    
        List tempResult = new ArrayList();
        for (int i = 0; i < 10; i++) {
          tempResult.add("Item " + i);
        }
        choiceBox.getItems().setAll(tempResult);
    
        VBox root = new VBox();
        root.getChildren().add(choiceBox);
        final Scene scene = new Scene(root, 300, 250);
        scene.getStylesheets().add("choiceBox.css");
        primaryStage.setScene(scene);
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    
    }
    

    choiceBox.css:

    @CHARSET "UTF-8";
    #choice-box-menu-item:focused  {
     -fx-background-color: yellow ;
    }
    #choice-box-menu-item .label {
     -fx-text-fill: black ;
    }
    

    Post edited by: James_D

  • Ungroup selected items, and then remove them

    Hello!

    I have a code which removes the tags (if there are tags) of objects and then delete them.

    The problem is so marked objects are grouped. Or objects grouped in another group.

    I need to unlink the selected objects and then close and delete.

    How can I do this?

    My current code:

    for (var iSel = app.activeDocument.selection.length-1; iSel >=0 ; iSel--){
         var currentSelection = app.selection[iSel];
              if (currentSelection.associatedXMLElement != null) {
                   currentSelection.associatedXMLElement.untag();
                   currentSelection.remove();
              }
              else {
                   currentSelection.remove();
              }
    }
    
    
    

    You can work with the property "allPageItems" for each selected object and removes the thiese brand first.
    Later you could delete all of the items selected, if you really must.

    Also locked points, if you wish.

    Code:

    var sel = app.selection;
    
    //UNTAG ALL SELECTED ITEMS:
    for(var n=0;n=0;n--){
    
        //LOCKED ITEMS WILL BE UNLOCKED:
        if(sel[n].locked){sel[n].locked = false};
    
        //THEN DELETED:
        sel[n].remove();
    
        };
    

    Uwe

  • Outline around the selected items of OCD

    WebHelp. RH9

    I just installed IE9 and when I run my published WebHelp and select a link in the table of contents, it displays an image dotted around the selected item. This never happened with IE8, so I was wondering if there is anyway to prevent it? Is it possible to add a "outline: no ' somewhere in the RoboHelp output (as you would in styling a CSS link) so that it does not appear?

    Thank you very much

    Jonathan

    Hi Jonathan,.

    Unfortunately, IE was a nut that is more difficult to crack than I imagined. The problem is that IE9 supports the css schema, but the table of contents is running in mode of whims so no goodness IE9 it... There is a solution, it's just not as easy as I thought. See http://www.wvanweelden.eu/robohelp/modifying_webhelp/remove_outline_in_toc for a step by step guide to get rid of the sketch.

    Note: If you let me, I would use your example on my site image. It seems much better than the image for example, I added

    Take a bow

    Willam

  • Cant' import images of Photos because "it is not enough free space on the volume of your library to import the selected items.

    Hey guys,.

    So I tried to import some ~ 8 GB of photos on my mac, but the Photos app gives me the following message: "there isn't enough free space on the volume of your library to import the selected items. It is estimated that you need at least X.XX GB of additional free space. »

    Where X.XX represents the amount of GB it says that I need but it changes everytime that I reopen the application to attempt an import.

    My mac has currently 44.4 GB so I don't know why this issue is coming.

    Any help would be great!

    Thanks in advance,

    Andres

    Where is your library?  If it's on an external HD and how the drive is formatted?

    Have you tried to repair the library according to this document from Apple: library of your repair?

    What version of PHotos do you use?

  • Get rid of the black borders around the selected items?

    My granddaughter of thirteen months was interested in my keyboard and now each selected item has a black frame to highlight... and there is a small sign at the bottom left of the screen showing what I typed just, by providing the keystrokes, etc..

    What is and how to turn everything off?

    Thank you!

    ED in Brooklyn

    System preferences/accessibility/voice off - turn off the power. Command - F5 works also.

  • How to replace the selected item in a tree control?

    How to replace a selected item in a tree control by a new order of string?

    Next time, try to be more specific.

  • To access the selected items in a ListBox control

    In LabVIEW 2010, I have a ListBox control. How can I get a list of the objects that the user selected in the ListBox?

    I don't see any method, property or event that would provide this information.

    Thank you.

    The value of the ListBox are the indexes of the selected items.

    If you allow the user to select "0 or more' items, the data type will change in a table."

    To get the names of the selected items (I guess that is what you want), you should India property 'element names.

    Tone

  • Appearance of the selected item

    Overall, I like the appearance of the Explorer of Windows Vista.  However, when an item is selected, the color of the selected item is so light that it is (for me) almost not visible.  I can change the classic theme, but really prefer to make just the darker outline.  How would I go to do this?

    Hello

    Panel Setup/Customize/Windows color and appearance of the control, use the slider to increase the intensity. There is no additional controls beyond that for aero colors. Good luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

Maybe you are looking for

  • Satellite P300 - 19 p - sound low battery notification

    Does anyone know if there is a way of creation/implementation of an audible low battery notification? I can't find a. Satellite P300-19 p/vista

  • GLASSES OLD AE1 FD on T3i or T4i, with adapter, T3i or T4i choice?

    GLASSES OLD AE1 FD on T3i or T4i? I have an old AE1 PROGRAM, with approximately five glasses of FD. About 10 years ago, I bought a Canon G6 and the TV/macro on the top lever is now frozen, but I can force the telephoto or Macro, but nothing in the Mi

  • Support for HP Pavilion Sleekbook 15 SATA3

    Hi all, I am new on this forum! I registered ask if someone can clear my mind on the SATA3 supported for this device. I have read the manual and I see it has Intel HM77 chipset which has 2 port SATA3 a 4 SATA2 ports Now, the Sleekbook has a SATA and

  • Can I determine which forces a user logoff?

    If a user chooses to force disconnect another user in the Task Manager, I found in the event viewer?  I tried without success. Thank you

  • Function index and virtual columns

    I just read the documentation of Oracle on the FBI. In the context of optimization with a function-based index, it is said that "a virtual column is useful for speed of access to data from expressions.". Here is the link Index-Organized Tables and in