OK, think it is sorted.
I have written a new widget called pyvcp_multilabel
It can display up to 6 different legends in the label text field, each one has a triggering bit pin which can be linked to anything suitable
It will display the text associated with the last pin triggered, so if you want to display one and then another you will have to leave a pause between triggers
The .xml format is
Code:
<multilabel>
<legends>["Label0" "Label1" "Label2" "Label3" "Label4" "Label5"]</legends>
<font>("Helvetica", 20)</font>
<disable_pin>False</disable_pin>
<initval>0</initval> Which legend to display by default (make sure it matches initval for linked widget if any)
<halpin>None</halpin> Optional alternative name base for pins
</multilabel>
The hal pins are created basename.widgetnumber.legendN
so in the above example the first pin would be
EDIT: pyvcp.multilabel.0.label0
Below is proof of concept screen print
EDIT: (the hal pins still have old experimental names, now set as per above to prevent huge unweildly pin names based on label text)
I have attached a zip of the new pyvcp_widgets.py to replace your old one with and a directory to be inserted into your /home/you/linuxcnc/configs directory,
which will run the example above and allow you to see how widget pins were linked etc.
In the absence of any major reported problems, once I have finished some other stuff I will add this to the patch submission
regards
EDIT:
Amended file to fix oversight which would have led to very long pin names