|
|
``Template main list procedure: UiBuildMainList'' shows example main list used the in the SCOamin template:
See also:
Template main list procedure: UiBuildMainList
proc UiBuildMainList {form top} { global appvals# Build basic main form drawnlist widget including: # o Manually built title label for CHARM # o Drawnlist record format # o traditional Count label beneath the drawn list
set labelFont medNormalFont
# Simple drawnlist place holder widget set cmd {VtDrawnList $form.mainList \ -rows 12 \ -columns 50 \ -rightSide FORM \ -callback UiMainListCB \ -defaultCallback UiMainListDoubleCB \ -autoLock {UiMainListDoubleCB} }
# Setup simple example using the "who" module # But for the following line, UiBuildMainList should be generic # and usable as is.
if {$appvals(who)} { set cmd [list WhoBuildMainList $form $top] }
set mainList [eval $cmd]
UiWidgetSet mainList $mainList $form
# Define the accompanying count label set countLabel [VtLabel $form.countLabel -label " " \ -topSide NONE \ -leftSide FORM \ -rightSide FORM \ -bottomSide FORM \ -labelRight] UiWidgetSet countLabel $countLabel $form VtSetValues $mainList -bottomSide $countLabel
# Stash the localized string "Selected" here so we only grab it once # from the message catalog UiWidgetSet selected [IntlMsg SELECTED] $countLabel # Return the bottom-most widget for further attachments return $countLabel }