Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Inheriting from DropGrid
Inheriting from DropGrid [message #23356] Tue, 13 October 2009 18:11 Go to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
I have a common control that I'd like to not setup each time, thus, I inherited from DropGrid and made AircraftDropGrid. The problem is that I cannot seem to use the AddPlus() method of DropGrid. Here is my code:

AddIndex(ID);
AddColumn(TAIL_NO, "Tail No.", 8);
AddColumn(TYPE_CODE, "Type", 6);
AddColumn(MAKE_MODEL, "Make & Model", 20);
Width(250);
SetValueColumn(1);

AddPlus(THISBACK(OnAddAircraft));


OnAddAircraft() is a public member of AircraftDropGrid. When I try an compile this, I get:

error C2039: 'OnAddAircraft' : is not a member of 'Upp::DropGrid'

Does anyone know how I can achieve this task?

Jeremy
Re: Inheriting from DropGrid [message #23360 is a reply to message #23356] Tue, 13 October 2009 19:33 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Have you added to your class?:
typedef AircraftDropGrid CLASSNAME
Re: Inheriting from DropGrid [message #23366 is a reply to message #23360] Tue, 13 October 2009 20:48 Go to previous message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
unodgs wrote on Tue, 13 October 2009 13:33

Have you added to your class?:
typedef AircraftDropGrid CLASSNAME



Oh... I do that on my Window classes don't know why I didn't do it on my control class. It works as expected now, thanks!

Jeremy
Previous Topic: Get number of displayed row in arrayctrl
Next Topic: GridCtrl: Adding column dynamically – How to make editable
Goto Forum:
  


Current Time: Thu Mar 28 14:05:11 CET 2024

Total time taken to generate the page: 0.01612 seconds