• How do I make panedwindow with invisible borders?

    From Luc@21:1/5 to All on Sat Dec 16 23:36:17 2023
    I am struggling hard to get a GUI to look like what I want.

    I made a first draft that looks very good. There are five columns
    (frames) side by side. Each column has a button at the top and a text
    widget right under it. The text boxes are pretty much invisible because
    the borders are completely invisible. Everything looks very clean.

    Now, that won't do because I need to be able to drag and resize the
    columns. So I had to redesign it all with panedwindow. The resizing
    works as expected, but now I can't make the borders invisible. I've
    been trying all kinds of configuration options with panedwindow and paneconfigure and can't make the borders disappear completely.

    It currently looks like this:
    https://0x0.st/HY1z.png

    I want it to look more like this:
    https://0x0.st/HY1i.png

    Do you guys have any idea of what I can do?

    Here is some code. Please disregard the w.add proc. It's just syntax
    sugar for adding widgets in a quicker and more compact way. I find
    that easier to read.


    panedwindow $::Widgets_unipane.singleViewModeFileListPane -orient horizontal \
    -background #FFFFFF -borderwidth 0 \
    -cursor arrow -sashcursor sb_h_double_arrow -sashwidth 1 -showhandle 0 -sashrelief flat -handlepad 1
    pack $::Widgets_unipane.singleViewModeFileListPane -fill both -expand 1

    array set widths {filename 100 size 100 date 160 permission 120 owner 120}
    set ::parent $::Widgets_unipane.singleViewModeFileListPane
    foreach columnname $::CustomVars_FileListColumns {
    set columnname [string tolower $columnname]
    w.add frame [set columnname]frame "wi $widths($columnname) cu arrow fi both ex 1"
    w.add button [set columnname]frame.button \
    "tx [string totitle $columnname] fo {Arial 12} -bd 0 cu arrow \
    bg #FFFFFF fg #BFBFBF highlightthickness 0 fi x ex 0 si top"
    w.add text [set columnname]frame.box \
    "fo {Arial 16} bg #FFFFFF fg #000000 bd 0 pd {0 0} sp1 1 sp2 1 sp3 1 \
    wr none tf 0 es 1 un 0 st normal sg true cu arrow ys p.Utils.filelist.yset \
    fi both ex 1 si left"

    $::Widgets_unipane.singleViewModeFileListPane add $::Widgets_unipane.singleViewModeFileListPane.[set columnname]frame
    $::Widgets_unipane.singleViewModeFileListPane.[set columnname]frame.box configure -relief flat -selectborderwidth 0 -insertborderwidth 0 -highlightthickness 1
    $::Widgets_unipane.singleViewModeFileListPane paneconfigure $::Widgets_unipane.singleViewModeFileListPane.[set columnname]frame -stretch first -width $widths($columnname)
    }
    return


    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luc@21:1/5 to All on Mon Dec 18 13:52:11 2023
    I have found a solution to my problem with -highlightthickness 0.

    It's strange because I had tried that before and it didn't work, but
    I probably changed something else between attempts that made a
    difference.

    Either way, it's solved. Sorry for any trouble.


    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)