hi all,
i am using wxRichTextCtrl on linux, wxGTK wxWidgets 2.9.2 for developing a serial comm terminal,
below some questions,
1. is the caret customizable ? I would like it to be a rectangle, i already tried with GetCaret / SetCaret, SetSize etc, nothing works.
2. is there a way to allow the user to delete "only" the characters written by him (no the WriteText written chars) ?
3. is there sme other more appropriate wxWidgets control for this ?
many thanks
Regards,
angelo
wxRichTextCtrl, some questions
wxRichTextCtrl, some questions
spectrum
-
- Ultimate wxWidgets Guru
- Posts: 672
- Joined: Tue Aug 31, 2010 6:22 am
- Location: Belgium
Re: wxRichTextCtrl, some questions
1. No idea : it should be, but I never tried it
2. No : once the text has been inserted, the control does not remember if it was introduced from a keystroke or from a WriteText method. So, you will have to handle this functionality yourself.
3. I think yes. I am not sure you need rich text functionality for terminal emulation. Maybe a wxTextCtrl would do the trick ?
2. No : once the text has been inserted, the control does not remember if it was introduced from a keystroke or from a WriteText method. So, you will have to handle this functionality yourself.
3. I think yes. I am not sure you need rich text functionality for terminal emulation. Maybe a wxTextCtrl would do the trick ?
Re: wxRichTextCtrl, some questions
thanks for the replies.
- I need to handle some vt100 special codes, so to be able to change colors on the fly. wxTextCtrl is not able to do this.
- I am wondering what controls are using putty or gtkterm, since they allows colors and a rectangular cursor.
- I need to handle some vt100 special codes, so to be able to change colors on the fly. wxTextCtrl is not able to do this.
- I am wondering what controls are using putty or gtkterm, since they allows colors and a rectangular cursor.
spectrum
Re: wxRichTextCtrl, some questions
For a terminal wxStyledTextCtrl may be more appropriate (it has features like code folding and syntax highlighting but you don't need to use them). I'm think the caret is customizable in it. A custom lexer might be able to handle vt100 colors too
"Keyboard not detected. Press F1 to continue"
-- Windows
-- Windows
Re: wxRichTextCtrl, some questions
i have found that gtkterm use "libvte-dev", and probably putty too.
Would be nice to find some c++ wrapper, or better, a wxWidgets similar equivalent.
regards
angelo
Would be nice to find some c++ wrapper, or better, a wxWidgets similar equivalent.
regards
angelo
spectrum
-
- Ultimate wxWidgets Guru
- Posts: 672
- Joined: Tue Aug 31, 2010 6:22 am
- Location: Belgium
Re: wxRichTextCtrl, some questions
Well, under Windows, you can handle colors with a wxTextCtrl. Take a look at wxTextCtrl::SetStyle method. I never tried this under Linux, but you can give it a try. Note that for this purpose, syntax highlightning capabilities of wxStyledTextCtrl will not be helpful as they are based on predefined syntax rules, and not information received from VT100 commands.I need to handle some vt100 special codes, so to be able to change colors on the fly. wxTextCtrl is not able to do this.