v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
687 stars 57 forks source link

--focus-field does not focus when --form is swallowed into --paned window #63

Open dreamstorpi opened 5 years ago

dreamstorpi commented 5 years ago

My --paned window has 2 tabs placed vertically, the upper tab is a --text-info and the lower tab is a --form for data entry. I am trying to focus a field in the --form tab, but it does not focus. Here is the code,

yad --plug=12345 --tabnum=1 --text-info --filename="$LINBMDDIR/TranscribedData/$CURRENTDTAFILE" --back=yellow --tail --editable &> "$LINBMDDIR/Program/Record-result_keyed" &

yad --plug=12345 --tabnum=2 --text="$MESSAGE" --form --columns=5 --focus-field=2 --field="" "${ENTRY_RESULTS[0]}" --field="" "${ENTRY_RESULTS[1]}" --field="" "${ENTRY_RESULTS[2]}" --field="" "${ENTRY_RESULTS[3]}" --field="" "${ENTRY_RESULTS[4]}" &> "$LINBMDDIR/Program/Record-result_entry" &

yad --paned --key=12345 --title "$WINDOWTITLE" --width=1000 --height=700 --orient=vert --splitter=550 --active-tab=2 --buttons-layout=center --button="<span foreground='red' font-size='x-large' font='bold'>ABANDON</span>":1 --button="<span foreground='green' font-size='x-large' font='bold'>UPDATE</span>":0

If I make a standalone --form, --focus-field=2 does work, ie,

yad --text="$MESSAGE" --form --columns=5 --focus-field=2 --field="" "${ENTRY_RESULTS[0]}" --field="" "${ENTRY_RESULTS[1]}" --field="" "${ENTRY_RESULTS[2]}" --field="" "${ENTRY_RESULTS[3]}" --field="" "${ENTRY_RESULTS[4]}" &> "$LINBMDDIR/Program/Record-result_entry"

I'm wondering if this is a bug or something that I doing incorrectly.

dreamstorpi commented 5 years ago

Some further info,

On first call the array values of the fields are empty. NO field focus.

If I fill the array elements with some character before first call, the field is focussed.

dreamstorpi commented 5 years ago

UPDATE - Sorry, text is highlighted in focussed field but the field itself is not focussed!