TIA,too--
You received this message because you are subscribed to the Google Groups "yad-common" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yad-common/7a4255f8-40c2-4c7f-ac0e-2820651ec098n%40googlegroups.com.
I know and I use the :CB to select one out of mutiple options. In this case I actually want to achieve something different:
Two groups of settings (:CB, text entry, :FL) may be set but only one group of settings can be applied. To avoid errors or a mix mes of all these, I have one checkbox ("A") near the "A" group of user settings / selections and the "B" checkbox near the "B" group of settings / selections.
Both groups of settings can be configured at will (and don't reset) but only one of these groups can be applied at any given time. I prefer to have the intuitive checkbox "Take these settings!" (and uncheck the other, like a switch).
In addition, I actually use a 4 TAB notebook and the next step would be to check/uncheck a parameter group on TAB1 which than must toggle a different / dependent / independent settings group on TAB2, TAB3 and/or TAB4.
There are defaults, spread over the TABs and when selecting set "A" on TAB1 different settings on other TABs depend on them and thus should be "switched on / off" respectively. The logical challenge is to only being able to select meaningful setting groups ("parameters") together and don't get contradicting ones mixed in.
--gurus....@gmail.com schrieb am Montag, 23. August 2021 um 01:10:46 UTC+2:In a form, two checkmarks (--field="...":CHK) exclude each other, logically. When "Feature A" becomes selected (TRUE) "Feature B" must become unchecked (FALSE) and vice versa:
Minimal example:yad --form --field="Feature A":CHK TRUE --field="Feature B":CHK FALSESo, how to uncheck "Feature B" when "Feature A" is check-clicked? What code can achieve this sort of switch?I think really old versions of Yad had Radiobuttons, which work like that, but they were removed. I needed them, but I found that a Combo Box (CB) does exactly the same job: You have a couple of items and you can select one of them. Yad then returns the item you selected, so that is easy to handle too.Kind regards
Johnny Rosenberg
TIA,too--
You received this message because you are subscribed to the Google Groups "yad-common" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yad-common/7a4255f8-40c2-4c7f-ac0e-2820651ec098n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "yad-common" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yad-common/6b88c7ee-f1df-4522-b300-93f4863b4770n%40googlegroups.com.
Maybe it's possible with dialogbox, an alternative to yad written with Qt libs.
To view this discussion on the web visit https://groups.google.com/d/msgid/yad-common/ba8e2013-0ba4-4439-bb9a-8eec00f9c2bbn%40googlegroups.com.
I think he was asking for bash dialogbox
but sure python3-tk library
- #!/usr/bin/env python3
- from tkinter import *
- def sel():
- selection = "You selected the option " + str(var.get())
- print(selection)
- label.config(text = selection)
- window = Tk()
- window.title('Tkinter')
- window.geometry('300x80')
- var = IntVar()
- R1 = Radiobutton(window, text="Feature A", variable=var, value=1,
- command=sel)
- R1.pack( anchor = W )
- R2 = Radiobutton(window, text="Feature B", variable=var, value=2,
- command=sel)
- R2.pack( anchor = W )
- label = Label(window)
- label.pack()
- R1.invoke()
- window.mainloop()
But one can as well use gtk+ library if familiar with python
To view this discussion on the web visit https://groups.google.com/d/msgid/yad-common/9d74d7c2-3a31-4b61-8fe5-6fe6a3de5e18n%40googlegroups.com.