Set default value to spinbox

More
28 Sep 2011 18:16 #13518 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.

Please Log in or Create an account to join the conversation.

More
29 Sep 2011 00:31 - 29 Sep 2011 00:33 #13534 by cmorley
try adding

<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.

More
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?

Please Log in or Create an account to join the conversation.

More
29 Sep 2011 05:39 #13537 by cmorley
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.

Please Log in or Create an account to join the conversation.

More
29 Sep 2011 07:06 #13538 by fma
Replied by fma on topic Re:Set default value to spinbox
cmorley wrote:

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

Ok.

if you're a python guy.

I am ;o)

Please Log in or Create an account to join the conversation.

More
29 Sep 2011 17:19 #13541 by BigJohnT
cmorley wrote:

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.

More
30 Sep 2011 00:57 #13546 by cmorley
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.125 seconds
Powered by Kunena Forum