[Ma...] Posted March 9, 2022 Share Posted March 9, 2022 Is it possible to add widgets to a dialog programmatically? I'm looking to add a checkbox for each item in a list. Thank you! Matt Link to comment https://qualityforum.zeiss.com/topic/731-how-to-add-dialog-widget-in-script/ Share on other sites More sharing options...
[Na...] Posted March 10, 2022 Share Posted March 10, 2022 Hello Matthew, you can insert a dialog into your script. There is a template for a checkbox, which will return true or false. This could be used to check your items. Here is the FAQ article regarding dialogs:https://connect.gom.com/display/GKB/Scripting+-+User-Defined+Dialogs#ScriptingUserDefinedDialogs-2.3.9Checkboxwidget Regards, Nanno Link to comment https://qualityforum.zeiss.com/topic/731-how-to-add-dialog-widget-in-script/#findComment-2249 Share on other sites More sharing options...
[Ma...] Posted March 10, 2022 Author Share Posted March 10, 2022 Hello Nanno, Thank you for the quick response! I am looking to add widgets to the dialog using the script. The number of checkboxes will be different each time. I did not see anything to do that in the FAQ, or using dir() and .__doc__ on the gom classes. After looking at this a bit further, I am thinking there is no built in way to do this. Dealing with the rows and columns would make it very difficult. But please let me know if I am missing something. I am going to try creating a dialog with a few checkboxes and then using the resulting xml as a starting point. I can modify and add to the xml string and then pass this as the content to the create_user_defined_dialog function. I will update to let you know how it goes. Thank you again, Matt Link to comment https://qualityforum.zeiss.com/topic/731-how-to-add-dialog-widget-in-script/#findComment-2252 Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in