Forum: wxRuby TE_CENTRE not defined in Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric R. (Guest)
on 2008-11-12 16:25
(Received via mailing list)
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.
Alex F. (Guest)
on 2008-11-12 16:48
(Received via mailing list)
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
This topic is locked and can not be replied to.