Hi All
I have written a code for window display, the window display format is below, however on executing code the button OK and CANCEL display in some other location and labelentry Major will not be aligned to the selectcommand label frame.
Can anybody tell what changes I have to do in the code to get the below window display
Thanking you in advance
regards
Aman
---------------------------------------------------
|
|
| -SelectCommand- Labelentry Major Button OK
| |Add | Labelentry Minor Button CANCEL|
| |Remove | Labelentry Command
| |-------------
|
|--------------------------------------------------
proc testgui1 {w} {
toplevel $w.top
wm geometry $w.top 543x278+284+358; #update
wm transient $w.top .
wm title $w.top "ADD / REMOVE API"
frame $w.top.mainframe -borderwidth 2 -relief groove -height 350 -width 495
pack $w.top.mainframe -expand true -pady .5c -padx .5c -ipadx 350 -ipady 495
set mainframe $w.top.mainframe
labelframe $mainframe.titframe -pady 2 -text " Select Command " -padx 2
pack $mainframe.titframe -side left -padx .5c -pady .5c -anchor nw -ipadx 5 -ipady 5
radiobutton $mainframe.titframe.rad0 -selectcolor white -text {Add API} -relief flat -variable radio0 -value 0
radiobutton $mainframe.titframe.rad1 -selectcolor white -text {Remove API} -relief flat -variable radio0 -value 1
pack $mainframe.titframe.rad0 -side top -anchor nw
pack $mainframe.titframe.rad1 -side top -anchor nw
LabelEntry $mainframe.lab77 -label { Major ID: } -takefocus 1 -text Edit -textvariable ""
LabelEntry $mainframe.cpd78 -disabledforeground #a3a3a3 -insertbackground black -label { Minor ID: } -takefocus 1 -text Edit -textvariable ""
LabelEntry $mainframe.lab79 -disabledforeground #a3a3a3 -insertbackground black -label {Command: } -takefocus 1 -text Edit -textvariable ""
button $mainframe.but80 -disabledforeground #a3a3a3 -pady 0 -text OK -width 10
button $mainframe.but81 -disabledforeground #a3a3a3 -pady 0 -text Cancel -width 10
pack $mainframe.lab77 -side top -pady 10 -anchor nw
pack $mainframe.cpd78 -side top -pady 10 -anchor nw
pack $mainframe.lab79 -side top -pady 10 -anchor nw
pack $mainframe.but80 -side top -padx 6 -pady 6 -anchor ne
pack $mainframe.but81 -side top -padx 6 -pady 6 -anchor ne
}
I have written a code for window display, the window display format is below, however on executing code the button OK and CANCEL display in some other location and labelentry Major will not be aligned to the selectcommand label frame.
Can anybody tell what changes I have to do in the code to get the below window display
Thanking you in advance
regards
Aman
---------------------------------------------------
|
|
| -SelectCommand- Labelentry Major Button OK
| |Add | Labelentry Minor Button CANCEL|
| |Remove | Labelentry Command
| |-------------
|
|--------------------------------------------------
proc testgui1 {w} {
toplevel $w.top
wm geometry $w.top 543x278+284+358; #update
wm transient $w.top .
wm title $w.top "ADD / REMOVE API"
frame $w.top.mainframe -borderwidth 2 -relief groove -height 350 -width 495
pack $w.top.mainframe -expand true -pady .5c -padx .5c -ipadx 350 -ipady 495
set mainframe $w.top.mainframe
labelframe $mainframe.titframe -pady 2 -text " Select Command " -padx 2
pack $mainframe.titframe -side left -padx .5c -pady .5c -anchor nw -ipadx 5 -ipady 5
radiobutton $mainframe.titframe.rad0 -selectcolor white -text {Add API} -relief flat -variable radio0 -value 0
radiobutton $mainframe.titframe.rad1 -selectcolor white -text {Remove API} -relief flat -variable radio0 -value 1
pack $mainframe.titframe.rad0 -side top -anchor nw
pack $mainframe.titframe.rad1 -side top -anchor nw
LabelEntry $mainframe.lab77 -label { Major ID: } -takefocus 1 -text Edit -textvariable ""
LabelEntry $mainframe.cpd78 -disabledforeground #a3a3a3 -insertbackground black -label { Minor ID: } -takefocus 1 -text Edit -textvariable ""
LabelEntry $mainframe.lab79 -disabledforeground #a3a3a3 -insertbackground black -label {Command: } -takefocus 1 -text Edit -textvariable ""
button $mainframe.but80 -disabledforeground #a3a3a3 -pady 0 -text OK -width 10
button $mainframe.but81 -disabledforeground #a3a3a3 -pady 0 -text Cancel -width 10
pack $mainframe.lab77 -side top -pady 10 -anchor nw
pack $mainframe.cpd78 -side top -pady 10 -anchor nw
pack $mainframe.lab79 -side top -pady 10 -anchor nw
pack $mainframe.but80 -side top -padx 6 -pady 6 -anchor ne
pack $mainframe.but81 -side top -padx 6 -pady 6 -anchor ne
}