TE_CENTRE not defined in Windows

When I try to create a TextCtrl with the TE_CENTRE style I get the
message
“uninitialized constant Wxruby2::TE_CENTRE”. I have the same problem
with
TE_RIGHT, but TE_LEFT and all the other TE_* styles seem to work fine.
I am
running Windows XP, Ruby 1.8.6 and WxRuby 1.9.9.

Has anyone else seen this?

Eric R.

Hi

Eric R. wrote:

When I try to create a TextCtrl with the TE_CENTRE style I get the
message “uninitialized constant Wxruby2::TE_CENTRE”. I have the same
problem with TE_RIGHT, but TE_LEFT and all the other TE_* styles seem
to work fine. I am running Windows XP, Ruby 1.8.6 and WxRuby 1.9.9.

Thanks for the report. It’s strange. The constants are definitely there
in the source files, but I also find TE_RIGHT and TE_CENTRE to be
undefined (1.9.9, SVN HEAD on OS X).

To work round it for now, you can use the following constants which have
the same value (in the C++ source, the TE_ constants are just aliases
for these).

Wx::TE_RIGHT = Wx::ALIGN_RIGHT
Wx::TE_CENTRE = Wx::ALIGN_CENTER_HORIZONTAL

alex