wxRichTextCtrl problem Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Mastersgn
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Apr 30, 2008 2:28 pm
Location: Mantova, Italy

wxRichTextCtrl problem

Post by Mastersgn » Wed Apr 30, 2008 3:37 pm

Hi!
I've a problem with wxRichTextCtrl because the enter key doesn't work (when i press enter key it change the control).I'm under win xp SP2 and i use wxPack (IDE: CodeBlocks).

This is the implementation:

Code: Select all

personaltextctrl=new wxRichTextCtrl(panel,wxID_ANY,wxEmptyString,wxDefaultPosition,wxDefaultSize,wxRE_MULTILINE | wxTE_RICH);
I tryed to change the Id and the control styles but nothing...

Why?
(sorry for my english)

lester
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Sep 02, 2006 7:24 pm
Location: Ukraine

Post by lester » Wed Apr 30, 2008 3:43 pm

Add wxWANTS_CHARS to style

Mastersgn
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Apr 30, 2008 2:28 pm
Location: Mantova, Italy

Post by Mastersgn » Wed Apr 30, 2008 3:59 pm

Thanks!!!
I take this opportunity to get another question: when i add an image to the control (wxRichTextCtrl::AddImage),
it first add a newline and then add the image.
Why?..Can i remove this behavior?
Thanks
Last edited by Mastersgn on Fri May 02, 2008 8:49 pm, edited 1 time in total.

Mastersgn
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Apr 30, 2008 2:28 pm
Location: Mantova, Italy

Post by Mastersgn » Wed Apr 30, 2008 4:44 pm

Ok, i solved with:

Code: Select all

parentCtrl->Remove((parentCtrl->GetLastPosition())-4,(parentCtrl->GetLastPosition())-3);
So first i add the image and then i remove the newline that the program adds...

Post Reply