Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  RichText and Multiline wxTextCtrl

col
Posted: Sat Jul 31, 2010 1:48 pm Reply with quote
Joined: 21 Jul 2010 Posts: 3
I am trying to create a wxTextCtrl which supports rich text while also supporting multiple lines:

Code:
Text = wxTextCtrl:new(Frame, ?wxID_ANY,
                         [{value,""},
                         {style, ?wxTE_RICH}])

The problem is that any text after "\n" that I append does not appear in the text field. Obviously, if I use wxTE_MULTILINE instead of wxTE_RICH, then I get multiple lines (but not rich text).
Is there a way I can get both? Is this a bug or a limitation?

Thanks
View user's profile Send private message
col
Posted: Mon Aug 02, 2010 7:35 am Reply with quote
Joined: 21 Jul 2010 Posts: 3
I found the solution. By using a bitwise OR, multiple options can be applied simultaneously.
So the solution for my problem is:
?wxTE_MULTILINE bor ?wxTE_RICH
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum