0

I am writing GIMP plugin in C and need to right align a number inside a GTK+ spin button.

I found out about gtk_button_set_alignment() but nothing like gtk_spin_button_set_alignment() seems to exist.

How can be this done?

1 Answer 1

2

You can inspect the class hierarchy, and notice that GtkSpinButton inherits from GtkEntry.

The latter has the method gtk_entry_set_alignment(), which is what I would recommend, that really should work.

There's also this question which is in C# but almost a dupe. Not sure what "false" means in that answer though, the xalign property is a float in the C API.

2
  • @user2389519 Great! Please click the check mark and accept the answer if you feel it helped.
    – unwind
    May 16, 2013 at 11:08
  • I saw the other question but was not able to find out how/where to set xalign here... May 16, 2013 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.