Hi again,
This is probably a longshot, but here goes. I am trying to plot a graph in the app that I am building. I am using codelite which, in turn, uses wxCrafter to build the gui. I have found a graph control called wxCharts. I have compiled it and tested a sample. I would ideally like to add it as a custom control in codelite - there is not very much in the way of documentation for this so I am little in the dark. I realise that this may be quite an advanced task but it would be good if I can work out how to achieve it! If someone could give me a few pointers I would really appreciate it. I guess the other way is to add the graph class manually to file generated from wxCrafter.
Thank you
Martyn
wxChart as custom control
-
- In need of some credit
- Posts: 8
- Joined: Thu Feb 11, 2021 7:53 pm
Re: wxChart as custom control
Have you asked this question on the codelite forum? If not, why not?
https://forums.codelite.org/
Tim S.
https://forums.codelite.org/
Tim S.
Re: wxChart as custom control
Hi,
(Indeed, the codelite forum would be a better place.)
You mentioned earlier that you were using, or thinking of using, XRC. It's a long time since I tried using wxXmlResource::AttachUnknownControl. wxCrafter does support that (see the 'Custom Controls' menu) but it is little used/tested, and obviously won't know any details about wxCharts.
Unless wxCharts provides its own XRC implementation, I suspect you'll find it far easier to subclass the C++ code and add it by hand.
Regards,
David
(Indeed, the codelite forum would be a better place.)
No, don't amend generated files; those alterations would be overwritten each time you used wxCrafter to amend something. Instead you should (in a separate file) derive from the base-class(es) created by wxCrafter.guess the other way is to add the graph class manually to file generated from wxCrafter.
You mentioned earlier that you were using, or thinking of using, XRC. It's a long time since I tried using wxXmlResource::AttachUnknownControl. wxCrafter does support that (see the 'Custom Controls' menu) but it is little used/tested, and obviously won't know any details about wxCharts.
Unless wxCharts provides its own XRC implementation, I suspect you'll find it far easier to subclass the C++ code and add it by hand.
Regards,
David