Set default value to spinbox
28 Sep 2011 18:16 #13518
by fma
Set default value to spinbox was created by fma
I started to write my AXIS GUI extension to drive my reprap hot-end temperature, and I was wondering if there is a way to set a default value to a spinbox widget?
For debug mode, I added 3 spinboxes for the P, I and D parameters. The range of the spinboxes is 0-10, but I would like to default them to P=1, I=0, D=0...
Thanks for your help.
For debug mode, I added 3 spinboxes for the P, I and D parameters. The range of the spinboxes is 0-10, but I would like to default them to P=1, I=0, D=0...
Thanks for your help.
Please Log in or Create an account to join the conversation.
29 Sep 2011 00:31 - 29 Sep 2011 00:33 #13534
by cmorley
Replied by cmorley on topic Re:Set default value to spinbox
try adding
<initval>1</initval>
to the spinbox stanza
Chris M
<initval>1</initval>
to the spinbox stanza
Chris M
Last edit: 29 Sep 2011 00:33 by cmorley.
Please Log in or Create an account to join the conversation.
29 Sep 2011 05:30 #13536
by fma
Replied by fma on topic Re:Set default value to spinbox
It works fine. Thanks!
BTW, where can I find all the usefull tags used by pyvcp?
BTW, where can I find all the usefull tags used by pyvcp?
Please Log in or Create an account to join the conversation.
29 Sep 2011 05:39 #13537
by cmorley
Replied by cmorley on topic Re:Set default value to spinbox
well the manual has most of them.
I looked in the source code for that one.
in an installed EMC that file is here:
/usr/share/pyshared/pyvcp_widgets.py
if you're a python guy.
I looked in the source code for that one.
in an installed EMC that file is here:
/usr/share/pyshared/pyvcp_widgets.py
if you're a python guy.
Please Log in or Create an account to join the conversation.
29 Sep 2011 07:06 #13538
by fma
Replied by fma on topic Re:Set default value to spinbox
cmorley wrote:
Ok.well the manual has most of them.
I looked in the source code for that one.
in an installed EMC that file is here:
/usr/share/pyshared/pyvcp_widgets.py
I am ;o)if you're a python guy.
Please Log in or Create an account to join the conversation.
29 Sep 2011 17:19 #13541
by BigJohnT
Replied by BigJohnT on topic Re:Set default value to spinbox
cmorley wrote:
Chris, is this good for both 2.4 and 2.5? I see is is missing from the manual :/
John
try adding
<initval>1</initval>
to the spinbox stanza
Chris M
Chris, is this good for both 2.4 and 2.5? I see is is missing from the manual :/
John
Please Log in or Create an account to join the conversation.
30 Sep 2011 00:57 #13546
by cmorley
Replied by cmorley on topic Re:Set default value to spinbox
Yes its good for both. I guess we just missed it !
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds