How to get currently selected item (1 Viewer)

Shukuyen

Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    Hi,

    I want to get the label string of the item currently selected in the GUI in my process plugin. I suppose there is a way to do it (MiniDisplay does it I guess), but I couldn't figure out how.

    Any hints?

    Thanks,
    Shukuyen.
     

    Shukuyen

    Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #3
    AW: How to get currently selected item

    Thanks for the answer catavolt, but that doesn't seem to be it. When navigating around in Basic Home and logging GUIPropertyManager.GetProperty("#selecteditem") it always is an empty string ...

    edit: ok, did some more testing ... #selecteditem is filled sometimes, an alternative seems to be #highlightedbutton. But both don't seem to be consistent :-S
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    The screen you are navigating has to set #selecteditem for you to catch it. Take a look at how MiniDisplay is working. #selecteditem should really only be filled when navigating a facadeview, like a list or thumbnails (IMHO anyways).
     

    Shukuyen

    Community Plugin Dev
  • Premium Supporter
  • May 8, 2008
    557
    300
    Lake of Constance
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #5
    AW: How to get currently selected item

    I tried to figure out how MiniDisplay does it yesterday, but to be honest I can't even find the method in the code where it is done ... this is way beyond me. In my plugin I am now checking #selecteditem, if this is empty I take #highlightedbutton. Not the best way I guess, but I will see how this works.
     

    Users who are viewing this thread

    Top Bottom