Text control with multiple selection

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
Nrgos
In need of some credit
In need of some credit
Posts: 5
Joined: Sun Feb 19, 2012 7:13 pm

Text control with multiple selection

Post by Nrgos » Fri Mar 23, 2012 2:30 am

Hello.

I want to create a hexadecimal view control. I'm try to derive from wxTextCrtl but not support multiple text selection. I see that wxStyledTextCtrl support this feature but it may be too heavy for a "simple" HexEditor.

Anyone know for others components that have multiselection?

RainRat
I live to help wx-kind
I live to help wx-kind
Posts: 178
Joined: Thu Jan 06, 2011 11:26 pm

Re: Text control with multiple selection

Post by RainRat » Sat Mar 24, 2012 6:37 am

It's not clear what you need. Do you want something like wxComboBox?

tuli
Knows some wx things
Knows some wx things
Posts: 42
Joined: Sat Dec 03, 2011 3:56 pm

Re: Text control with multiple selection

Post by tuli » Sat Mar 24, 2012 5:28 pm

do you want to create a hexeditor?
if so, you`ll i would say you have to create your own control/widget.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2292
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: Text control with multiple selection

Post by evstevemd » Sun Mar 25, 2012 7:59 pm

Nrgos wrote:Hello.

I want to create a hexadecimal view control. I'm try to derive from wxTextCrtl but not support multiple text selection. I see that wxStyledTextCtrl support this feature but it may be too heavy for a "simple" HexEditor.

Anyone know for others components that have multiselection?
Why do you think it is too heavy? I think it is the only widget I have idea of that fits well the deal!
You don't have to use all features that it comes with and is very handy when you need to add them.
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

Nrgos
In need of some credit
In need of some credit
Posts: 5
Joined: Sun Feb 19, 2012 7:13 pm

Re: Text control with multiple selection

Post by Nrgos » Mon Mar 26, 2012 3:01 am

RainRat wrote:It's not clear what you need. Do you want something like wxComboBox?
No, i meant a text box that support multiple text selection. Something like this:
Image
to use like this:
Image
tuli wrote:do you want to create a hexeditor?
if so, you`ll i would say you have to create your own control/widget.
Yes, but to create my own widget, that supports multi platform(win,liunx,mac), would be hard. For that reason I'm looking for a control/widget which can to inherit.
evstevemd wrote: Why do you think it is too heavy? I think it is the only widget I have idea of that fits well the deal!
You don't have to use all features that it comes with and is very handy when you need to add them.
Well, stc.dll(the wxStyledTextCtrl library) have a size about 1MB or if you use static build the final size of the executable increase about 1MB. I guess not too heavy and isn't difficult to use (the above example image, is an application that I created using wxStyledTextCtrl and have about 250 lines of code). Perhaps will be good option, although i was looking something more simple, like wxTextCtrl with multiple text selection.

tuli
Knows some wx things
Knows some wx things
Posts: 42
Joined: Sat Dec 03, 2011 3:56 pm

Re: Text control with multiple selection

Post by tuli » Tue Mar 27, 2012 12:20 pm

that doesnt exist to my knowledge.
In fact, when i needed this some time ago, i designed my own widget for this...it didn't support multiple selections, but i dont think i would have much trouble adding that.
(the above example image, is an application that I created using wxStyledTextCtrl and have about 250 lines of code)
this is awesome!
would you mind sharing your code? [-o<

Nrgos
In need of some credit
In need of some credit
Posts: 5
Joined: Sun Feb 19, 2012 7:13 pm

Re: Text control with multiple selection

Post by Nrgos » Tue Mar 27, 2012 10:41 pm

tuli wrote:
(the above example image, is an application that I created using wxStyledTextCtrl and have about 250 lines of code)
this is awesome!
would you mind sharing your code? [-o<
Well... are 250 lines excluding blank lines, comments and headers. Maybe I made a too optimistic approach :roll: . And thinking about it more, considering all the necessary subclasses maybe are more. Including all are about 600 or 800 lines. I do not mind sharing the code, though it is commented by 99% in spanish.

Post Reply