Hi, I am programming a GUI and want to include a fast way to access models by incorporating buttons for them that display the appropriate model when clicked. My problem is that there can be about 20 models and some of the buttons are packed off the screen. I was hoping to be able to do something like the taskbar in Windows where the buttons get smaller as the bar is filled or just have them wrap onto the next line.
If the models are stored as a list in modList, the following simple code emulates what I have at the moment,
frame .f1
pack .f1
set bNo 0
foreach model $modList {
button .f1.btn$bNo -text $model -command [list draw $model]
pack .f1.btn$bNo -side left
incr bNo
}
Thanks for reading
If the models are stored as a list in modList, the following simple code emulates what I have at the moment,
frame .f1
pack .f1
set bNo 0
foreach model $modList {
button .f1.btn$bNo -text $model -command [list draw $model]
pack .f1.btn$bNo -side left
incr bNo
}
Thanks for reading