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?

unwind
  • 391,730
  • 64
  • 469
  • 606
user2389519
  • 270
  • 2
  • 10

1 Answers1

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.

Community
  • 1
  • 1
unwind
  • 391,730
  • 64
  • 469
  • 606