I am working on a GUI using Perl Tkx and found that there are two separate functions that can be used to create buttons. ( button and ttk__button ).
Until now, the only difference I found is that the function button seems that center aligns the text, while the function ttk__button is left to justify the text.
Example using button :
#!/usr/bin/perl use strict; use warnings; use Tkx; my $text = "Hello\nworld!\n\nThis is some text..."; my $mw = Tkx::widget->new("."); my $b = $mw->new_button( -text => $text, -command => sub { exit; }, ); $b->g_grid; Tkx::MainLoop()
This script will center the text:

Example ttk__button :
#!/usr/bin/perl use strict; use warnings; use Tkx; my $text = "Hello\nworld!\n\nThis is some text..."; my $mw = Tkx::widget->new("."); my $b = $mw->new_ttk__button( -text => $text, -command => sub { exit; }, ); $b->g_grid; Tkx::MainLoop()
This script will leave text alignment:

I was wondering what other differences exist between the two functions and if there is any specific reason, there are two separate functions that the buttons create. Is one usually better to use than the other?
ttk__button there also a way to align text with the ttk__button function?
EDIT:
I added the "Tcl" tag to this, since Perl Tkx is essentially built from Tcl. I am very familiar with Perl, but I start a little when it comes to Tcl.
Although this may not seem like this at first glance, it is actually a Tcl question rather than a Perl question, so I would like to hear the answer from someone who is testing Tcl.
Note:
In the center of the text in ttk__button add the following line to your code:
Tkx::ttk__style_configure('TButton', -justify => 'center');