Showing results for 
Search instead for 
Do you mean 
Reply

List box on UI block style GUI keeps "shrinking" after each "apply"?

To all,

 

I have a created a test GUI using the Block UI Styler and it contains 2 listboxes. When I execute the program (pressing 'Apply') it is executed and work as intended. I have however noticed that the 2 listboxes "shrink" after each execution so after 2 or 3 successive running of the program the listbox is 1 line high. Not very useful! I need to close and re-open the GUI to re-set as wanted.

 

I initialise the GUI as follows,

Public Sub initialize_cb()

   'all the declaratin stuff,  etc
   LBoxRespSimAndEventName.Height = 6
 
End Sub
 

and I cannot figure out where to put a line of code to "force" (or prevent) the height to change.
Any hint or suggestions?

 

Thanks
Regards

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
3 REPLIES

Re: List box on UI block style GUI keeps "shrinking" after each "apply"?

Have you tried specifying this in the DLX file through block styler?

This would be the prefered way.

 

Another way would be the dialogshown_cb callback or at the very end of the apply_cb callback.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: List box on UI block style GUI keeps "shrinking" after each "apply"?

Thanks Stefan for the suggestion

 

1. forgot to check the option last night whiel updating the dlx. A quick check on the options available shows a 'MinimumHeight' (default 0) which I'll try "force" to say 6 later.

 

2. Just tried "forcing" the height at the end of the apply_cb  (after the call to the function processdata()) and the programm is executed OK but "crashes" at the end with warning messages. See atthaced if anyone interested. Seem sit's not the right place to put these line of code.

 

3.in the dialogshown_cb(). NX does not like it. Warning message when opening the GUI but open OK

 

The "behaviour" of the GUI (i.e. "shrinking" effect) is an odd one as it only happens if I change the option (on the GUI) then run the program. It seems that if I run the program with all the default options, when the GUI is initialised, then no "shrinking" happen regardless how often I run the program. If I change one of the choices on the GUI say result type from “Force” (which is the default) to “Stress” then run the program once it is completed the whole GUI re-set itself (i.e. result type default back to “Force”). It seems that everything re-set itself to the way I want the GUI to be shown the 1st time to the user except the 2 list boxes which shrink!

 

Regards

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: List box on UI block style GUI keeps "shrinking" after each "apply"?

The list box documentation should tell you when the parameter can be changed, some can only be change at creation time, which might be the case here.

 

Best is to set up the dialog in the UI styler and only enable and disable widgets afterwards.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community