When to use what label?

More
17 Mar 2014 15:56 #44912 by mariusl
Hi
Please help me understand when to use what label. They way I currently understand it is as follows:

A hal_label widget is connected directly to the hal interface and does not go to my python handler. I dont know if I can see it or intercept it in my handler.

A gtk_label is can be written by my python handler. I have to create a hal_pin in the handler to look at and then effect the label if I wish.

So the question is really when do I use what label for best practise?

Regards
Marius


www.bluearccnc.com

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

More
18 Mar 2014 02:52 #44931 by newbynobi
Replied by newbynobi on topic When to use what label?
Hallo Marius,

in most cases if you just want to display a hal value or modify a value, it is the easiest way to use just a hal widget, may it be a label or any other widget.

If there is no widget, giving you all the flexibility you need, then take a normal gtk widget and add the pins and handlers as you need in your python handler file.

If you need a hal pin:
Try first hal widget, and if not OK use gtk.widgets with you own handler file

If you do not need a Hal Pin for your panel, i.e. a table to arrange your widgets:
never use a hal widget for that purpose!

Norbert

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

More
18 Mar 2014 12:30 #44943 by mariusl
Replied by mariusl on topic When to use what label?
Hi Norbert
Thanks for the reply. I think I understand but as with most things, you learn as you go.

I have more problems understanding GTK than I do with Python at this stage :(

Regards
Marius


www.bluearccnc.com

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

More
18 Mar 2014 19:16 #44948 by BigJohnT
Replied by BigJohnT on topic When to use what label?

Hi Norbert
Thanks for the reply. I think I understand but as with most things, you learn as you go.

I have more problems understanding GTK than I do with Python at this stage :(


I have some tutorials on Python GTK Glade.

gnipsel.com/glade/index.html

JT

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

More
18 Mar 2014 19:29 #44949 by newbynobi
Replied by newbynobi on topic When to use what label?
And the tutorials are very good, I learned a öot of them!

Norbert

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

More
19 Mar 2014 01:17 #44958 by mariusl
Replied by mariusl on topic When to use what label?
Thanks JT, have learnt a lot from your site already. I will check out the tutorials.
If its good for Norbert then its good for me. ;)

Regards
Marius


www.bluearccnc.com

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

Moderators: HansU
Time to create page: 0.081 seconds
Powered by Kunena Forum