The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hi all,
I'm trying to put a script together which uses tickboxes but can't seem to find the command to produce a tickbox.
Anyone have any ideas?
Cheers
Andy
there is a toolkit called HWTK in HW installation.
They might help you to get started.
Awesome, many thanks Adriano
just as a hint that i've received from a colleague:
Most of the examples start from a 'preview' frame, in HWTK gallery, which is not available in a regular HM session.
So in order to use some widget, always create first a window/dialog, then start adding your buttons, checks, ...
In the example, 'recess' is the name of the frame/dialog
.
hwtk::dialog .d -title Dialog -transient [winfo toplevel $w] .d hide apply .d post set recess [.d recess]
after that, add your other statments.
set w [hwtk::labelframe $recess.lf -text 'Saftey Check' -padding 2] pack $w -anchor nw -pady 4 -padx 4
set i 0 foreach option {'Wipers OK' 'Lights OK' 'Brakes OK' 'Driver Sober'} { set cb [hwtk::checkbutton $w.b$i -text $option] pack $cb -side top -fill x -pady 2 -padx 4 incr i }
Many thanks Adriano,
Am typically used to creating windows using
destroy .selection set f .selection; frame $f hm_framework addpanel $f 'Tool Selection'; hm_framework drawpanel $f;
Although I will give your version a go.
Something which does bother me is the padding
'pack $cb -side top -fill x -pady 2 -padx 4'
Say I have 20 options and I use this code, a column of 6 tickboxes will appear in the window and the rest will simply not appear What I would like it to do is create columns. How do I get it to create several columns?
Put the frame in a text box (hwtk text has scrollbars)
And then get hull of textbox, use this hull as a frame to be added to hm panel
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…