Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make a frame fill the entire available space, and the widget inside it to stick to the left side
    primarykey
    data
    text
    <p>I want to have a frame that fills the entire screen from left to right (because of the border relief) and the widgets inside it to stick to the left side. But when I put <code>-sticky nswe</code> on the frame and <code>-sticky nsw</code> on the widgets themselves, the frame takes the entire window, but the widgets are aligned to the left of the <strong>center</strong> of the frame and not to the left-most side of it:</p> <p><img src="https://i.stack.imgur.com/cJ0Fo.jpg" alt="enter image description here"></p> <p>and I want it to look like (created with paint):</p> <p><img src="https://i.stack.imgur.com/Bhfl9.jpg" alt="enter image description here"></p> <p>And the code creating it is (for the upper frame, with the file extentions):</p> <p><strong>EDIT:</strong> added more of the code, and fixed the numbering issue of the columns and rows</p> <pre><code>proc eyes_view_create_file_extention_bar {frm_main listOfPossibleExtensions} { #Files Extention Bar set files_cb ::eyes_view_file_ext_arr_cb grid [set file_frm [frame $frm_main.file_frm -relief groove -bd 2]] -row 0 -column 0 -columnspan 2 -sticky nswe set file_lbl [label $file_frm.lbl -text "File Extenctions to Show:"] set columns 0 foreach file_ext $listOfPossibleExtensions { set cb [checkbutton $file_frm.[regsub -all {\.} $file_ext {}] -text $file_ext -variable ${files_cb}(${file_ext}) -command [list _eyes_view_update]] set ${files_cb}(${file_ext}) 0 grid $cb -row 1 -column $columns -sticky wsn incr columns } grid $file_lbl -row 0 -columnspan $columns -sticky wsn } proc eyes_view_main_widget {base listOfExternalVarsAndValues listOfPossibleExtensions} { wm title $base "Eyes Viewer" array set [set files_cb ::eyes_view_file_ext_arr_cb] {} array set [set vars_cb ::eyes_view_vars_arr_cb] {} set frm_main [frame $base.main_frm] pack $frm_main -expand 1 -fill both #graph set g_frm [frame $frm_main.graph] grid $g_frm -row 2 -column 1 -sticky nsew set g [eyes_graph_widget $frm_main.graph graph] #splits table grid [set split_frm [frame $frm_main.tbl_split]] -row 2 -column 0 -sticky nswe set apply_button [button $split_frm.apply -text "Apply" -command [list _eyes_view_update]] set split_tbl_frm [frame $split_frm.tbl_frm] set split_table [sparam_table_widget $split_tbl_frm split_table] #file extensions frame, vars frame &amp; legend set file_frm [eyes_view_create_file_extention_bar $frm_main $listOfPossibleExtensions] set var_frm [eyes_view_create_vars_values_bar $frm_main $listOfExternalVarsAndValues] set legend_frm [eyes_view_create_legend_frame $frm_main] grid $split_tbl_frm -row 0 -sticky nwse grid $apply_button -row 1 -sticky nwse grid columnconfigure $frm_main 0 -weight 0 grid columnconfigure $frm_main 1 -weight 1 grid rowconfigure $frm_main 0 -weight 0 grid rowconfigure $frm_main 1 -weight 0 grid rowconfigure $frm_main 2 -weight 1 grid rowconfigure $frm_main 3 -weight 0 grid rowconfigure $split_frm 0 -weight 1 grid rowconfigure $split_frm 1 -weight 0 ... return [list $g $split_table $legend_frm $frm_main] } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload