Oh yeah, I didn't see the custom primitive part, sorry. For regular custom properties, you can do it in an OnInit or even an OnClicked, at least in scripting.
On Wed, Nov 27, 2013 at 4:10 PM, Guillaume Laforge < [email protected]> wrote: > Thanks for the help Stephen, but it doesn't work even using wide character > (and even without using the L prefix, I guess it would be cast to wide by > the CString constructor). > > I think the problem is that the Refresh is working for the PPG layout but > not to update the internal combo list array. Using a custom property, I > could probably do it in the init callback (thanks to Eric Thivierge for the > idea), but custom primitives (that are a nice 2014 feature btw) don't > provide such callback. > > > On Wed, Nov 27, 2013 at 3:00 PM, Stephen Blair <[email protected]>wrote: > >> That should work. That's how they do it in the >> PSetUIDemo\cppsrc\PSetUIDemoCPP.cpp >> >> //Redraw the PPG to show the new combo items >> ctx.PutAttribute(L"Refresh",true); >> >> Maybe you need the L prefix? >> >> >> On Wed, Nov 27, 2013 at 2:17 PM, Guillaume Laforge < >> [email protected]> wrote: >> >>> Hi, >>> >>> I've got a custom primitive with a "drop down list enumerator" defined >>> in its DefineLayout callback. >>> I need to rebuild the "UI Items array" before inspecting the custom >>> primitive as it is dynamic. >>> The only working way for now is by right clicking the PPG name and pick >>> "Refresh". >>> >>> I added a button using this logic (in the PPGEvent) but it does nothing: >>> >>> if ( buttonPressed.GetAsText() == "Refresh" ) >>> { >>> in_ctxt.PutAttribute("Refresh", true); >>> } >>> >>> Is there a way to get the same behavior than the "Right click and >>> Refresh" using the C++ SDK ? >>> >>> Thanks, >>> >>> Guillaume Laforge >>> >>> >> >

