Jump to content
Stefan Bender

How to add static texts to OIP?

Recommended Posts

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

 

oip static.png

Share this post


Link to post

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...

Share this post


Link to post

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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×