Stefan Bender Posted April 4, 2018 Share Posted April 4, 2018 Dear developers, for a new task I need to add a pair of (name, value) to the OIP of a PIO (see below). The texts need to be static and disabled. Sounds simple, but looking at the widget utility functions in the SDK I can not see how to do that. These functions assume that the values are part of the PIO's record format. But I need to write texts that are arbitrary values, no record fields. Currently I'm trying to define the widgets with type kWidgetStaticTextParam, but then the text at the right hand side of the OIP is empty and I don't know how to set it. SWidgetDefinition only contains a member variable fWidgetText (which would be the left one), but I can't see how to set the right hand value. Which widget type do I need to use and how can I set left and right hand text (as redlined in attached image) without having to "link" a record field to the widget? Thanks for any help, Stefan Bender Quote Link to comment
JBenghiat Posted April 4, 2018 Share Posted April 4, 2018 Use the TransferValue(SShapePaneWidgetTransferValue& data) method of IProviderShapePane. For each widget where you want to set a value: if ( fWidgetsProvider->GetWidgetByIDSafe( <Widget ID> ).fWidgetID == data.fWidgetID ) data.fWidgetAccess->Set... Quote Link to comment
Stefan Bender Posted April 9, 2018 Author Share Posted April 9, 2018 Joshua and Vlado, thanks for your help! I would have preferred to set the strings in the ::Update() function, but at least it works now. Regards, Stefan Bender Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.