How to set the current item in the active panel

A place where plug-in developers can share their knowledge and experience.
Post Reply
Spire
Posts: 2
Joined: Sun 11 Aug, 2019 14:08

How to set the current item in the active panel

Post by Spire »

I'm writing a plug-in that needs to set the current item in the active panel. Reading the documentation, I can see how to get the index of the current item (call PluginStartupInfo::PanelControl(PANEL_ACTIVE, FCTL_GETPANELINFO, ...) and then check PanelInfo::CurrentItem); however, I can't find any information on how to set it.

Is there any way to do what I'm trying to do?
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

How to set the current item in the active panel

Post by DrKnS »

  1. PanelRedrawInfo pri {sizeof(pri)};
  2.  
  3. pri.CurrentItem = 42;
  4.  
  5. PanelControl(PANEL_ACTIVE, FCTL_REDRAWPANEL, 0, &pri);
Spire
Posts: 2
Joined: Sun 11 Aug, 2019 14:08

How to set the current item in the active panel

Post by Spire »

That worked; thanks!
Post Reply

Return to “Plug-In Developers”