Auto-resize correctly

38 views
Skip to first unread message

zenos mate

unread,
May 1, 2021, 2:31:33 PM5/1/21
to yad-common

Hi,
I want to automatically scale the window according to the length of the text piece.  
Which method would be best to do for jobs like this?
Thank you in advance for your help
--Mertcan

#! /bin/bash
#. ~/zen.sh
a_Menu=(
"One Blah blah"\
"Two Blah"\   
"Three Blah Blah blah Blah blah Blah blah Blah blah Blah blah Blah blah Blah blah Blah EOL"\
"Four bla Blah"\  
"Five Blah blah"
)
 nMaxLen=90         #  nMaxLen=$( maxlen_array "a_Menu" )
 nLenArr=5          #  nLenArr="${#a_Menu[@]}"

let "nWIDTH= 7 * $nMaxLen"
let "nHEIGHT=50 * $nLenArr "
            ### --width="${nWIDTH}" --height="${nHEIGHT}"
 
yad --list --center  --title "IS THIS CORRECT AUTO-RESIZE METHOD?"\
    --geometry "${nWIDTH}x${nHEIGHT}"\
    --column "Select" "${a_Menu[@]}"    
    
 

Victor Ananjevsky

unread,
May 4, 2021, 9:55:44 AM5/4/21
to yad-c...@googlegroups.com

hi

try to add the following options - --ellipsize=end --ellipsize-cols=1 --tooltip-column=1


В Sat, 1 May 2021 11:31:33 -0700 (PDT)
zenos mate <zenli...@gmail.com> пишет:
--
wbr
Victor Ananjevsky <vic...@sanana.kiev.ua>
Reply all
Reply to author
Forward
0 new messages