Skip to main content
Participant
June 25, 2026
Question

Programmatically set the MinValue of a EVEIntPopupSliderComboBoxWidget

  • June 25, 2026
  • 0 replies
  • 16 views

I use a EVEIntPopupSliderComboBoxWidget in my InDesign C++ plug-in and want to programmatically set the MinValue and MaxValue in the dialog controller.

 

fr file:

EVEIntPopupSliderComboBoxWidget // Opacity percentage slider
(
kPollingSliderWidgetID, // The Identifier for this Widget
kSysSliderPMRsrcId, // kPMRsrcID_None,
kBindNone, // Frame binding
Frame(0,0,60,25) // Frame(l,t,r,b)
kTrue, // Is this visible
kTrue, // Is this enabled
0, // The WidgetID for the nudge button
1, // small nudge amount
10, // large nudge amount
3, // The maximum number of characters
kFalse, // integer readOnly value
kFalse, // Notify on key stroke
kTrue, // Enable range checking
kFalse, // Allow blank entry
300, // The upper limit
5, // The lower limit
"100", // The String value
100, // slider length in pixel

kEVERegularSpaceAfter,
),

 

In Controller::InitializeDialogFields:

IControlView* controlView = panelControlData->FindWidget(kPollingSliderWidgetID);
InterfacePtr<ISliderControlData> sliderControl(controlView, UseDefaultIID());

sliderControl->SetValue(config->getPollInterval());
sliderControl->SetMinValue(Configuration::MIN_POLLING_INTERVAL, kFalse, kFalse);
sliderControl->SetMaxValue(Configuration::MAX_POLLING_INTERVAL, kFalse, kFalse);

 

It does not work, the min and max values remain the same as specified in the *.fr file.

 

Setting the SetTextValue works fine, thought.

this->SetTextValue(kPollingSliderWidgetID, config->getPollInterval());

 

Retrieving the value later works too:

IControlView* controlView = panelControlData->FindWidget(kPollingSliderWidgetID);
InterfacePtr<ISliderControlData> sliderControl(controlView, UseDefaultIID());
PMReal val = sliderControl->GetValue();
config->setPollInterval(ToUInt32(val));

 

Can you tell me what i am doing wrong?

 

Best regards