charliefjohnson Posted December 13, 2016 Report Share Posted December 13, 2016 The documentation mentions that for the List widget, a item can be in unselected, selected, disabled selected and disabled unselected state. And that you can have a different image for each. But I don't see anywhere in the APIs for the List widget, a way to set an item to disabled selected or disabled unselected. Do these states exist yet ?? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 14, 2016 Report Share Posted December 14, 2016 The disabled state refers to the state of the entire widget (which you can control through gwinSetEnabled() as well as the corresponding gwinEnable() and gwinDisable() wrappers). With the implementation of the default built-in list widget it's not possible to enable/disable individual list items. If you need such functionality we recommend implement a custom widget. In this particular case you can simply copy the /src/gwin/gwin_list.h and /src/gwin/gwin_list.c files to your project and modify them accordingly. Please don't hesitate to ask if you have any further questions. We're happy to help. Link to comment Share on other sites More sharing options...
charliefjohnson Posted December 14, 2016 Author Report Share Posted December 14, 2016 I would like to change the text of a list item, but not it's position. Currently I do that by deleted all the items and the re-adding them back which is time consuming. (For example if the language is changed from English to French.) What I'd like is a gwinListItemSetText() or gwinListItemPrintf(). Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 14, 2016 Report Share Posted December 14, 2016 There's currently no existing API to do that as you discovered. I added this feature request to our ToDo list. Of course you can always add that function yourself if you are in a hurry. The existing functions of the list widget show how to access items in the list. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 9, 2017 Report Share Posted January 9, 2017 @inmarket just added the new function named gwinListItemSetText() to the library. You can grab the latest master branch of the repository to use this new feature. Please let us know if there are any problems. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now