0

I'm trying to build Gui with Tcl.tk and use it inside ICC (Synopsys). Problem: All texts are justify to center instead of left. every creation of "checkbutton" show text at center. How can I order texts to be justify left side? How can I disable halo around "checkbutton"?

 package require Tk 8.4
 set default_font *adobe*helvetica*bold-r-normal*12*
 option add *font $default_font
 option add *background #D4D0C8
 option add *foreground #000000
 option add *activeBackground #ececec
 option add *activeForeground #100
 option add *selectBackground #c3c3c3
 option add *disableForeground #a3a3a3
 option add *troughColor #c3c3c3
 option add *highlightBackground #d9d9d9
 option add *width 2


 proc ttt {} {


 set mainWin ".win"
 destroy $mainWin
 toplevel $mainWin  -padx 1 -pady 1 
 wm title $mainWin "Aviadz Tools" 
 wm geometry $mainWin +50+50
 wm resizable $mainWin 1 1


 frame $mainWin.top -borderwidth 1 
 pack  $mainWin.top -side top -fill x -ipadx 200 -ipady 300 -anchor nw  

 labelframe  $mainWin.top.icc -text " ICC " -fg blue -padx 5 -pady 5 
 pack        $mainWin.top.icc  -side top  -anchor nw 
 place $mainWin.top.icc -x 1 -y 1 -width 300 -height 160

 place [checkbutton $mainWin.top.icc.change_name -background grey -text "Change names" -justify left] -x 1 -y 0 
 place [checkbutton $mainWin.top.icc.vout -background grey -text "Verilog Out" -justify left] -x 1 -y 30 
 place [checkbutton $mainWin.top.icc.defout -background grey -text "DEF Out" -justify left] -x 1 -y 60 

 place [checkbutton $mainWin.top.icc.copy_mw_lib -background grey -text "Copy MW Lib" -justify left] -x 1 -y 90 

 pack $mainWin.top.icc.change_name $mainWin.top.icc.vout  $mainWin.top.icc.defout    
 $mainWin.top.icc.copy_mw_lib -anchor w   

 button $mainWin.start -background green -text "Start" -command start 
 place $mainWin.start -x 158 -y 250
 pack $mainWin.start -side bottom -fill x 

}

toplevel example

JigarGandhi
  • 243
  • 6
  • 18

1 Answers1

1

You can place the text inside a widget with the anchor option like:

button .c -text "Test" -width 100 -anchor w
Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
Klaus
  • 24,205
  • 7
  • 58
  • 113