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 » Sun 11 Aug, 2019 14:43

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: 5397
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 227 times

How to set the current item in the active panel

Post by DrKnS » Sun 11 Aug, 2019 15:19

  1. PanelRedrawInfo pri {sizeof(pri)};
  2. pri.CurrentItem = 42;
  3. 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 » Sun 11 Aug, 2019 15:41

That worked; thanks!

Post Reply

Return to “Plug-In Developers”