U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Proper SplitterFrame removal++
Re: Proper SplitterFrame removal++ [message #58402 is a reply to message #58221] Tue, 17 May 2022 15:34 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
luoganda wrote on Mon, 28 March 2022 08:51
1st question is more about c++, but anyway:
I have this struct.
struct SCtrl:Ctrl{
	void Paint(Draw& w)override{
		...
	}
};
Array<Ctrl> ctrls;
Array<SCtrl> sctrls;
ctrls.Create<Button>(); //this is ok
sctrls.Create<Button>(); //this produces error(no matching member function for call to 'Add')

Can the last one be done, so that SCtrl is somehow subclassed but still used as Ctrl to be used as Button,...?


You can only Create instances of classes that are derived from T. Button is descendant of Ctrl, but not SCtrl.

Quote:

Any idea how to do this properly? maybe provide copyCtor?


Do what? Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FEATURE] Common horizontal scroll on Shift+mouse wheel
Next Topic: How would I virtualize a scrollable view to dynamically load Ctrls?
Goto Forum:
  


Current Time: Mon Apr 27 00:17:51 GMT+2 2026

Total time taken to generate the page: 0.00495 seconds