[Gambas-user] newbie question virtual classes

Laurent Carlier lordheavy at ...512...
Tue Jan 31 19:23:55 CET 2006


Le Mardi 31 Janvier 2006 19:06, johnf a écrit :
> Hi,
> could someone point me to a website or something I can read.  I don't
> understand the ".treeview" is a virtual class documentation.  I don't
> understand Doc's when is states
>
> ListView.Item property is .ListViewItem.  Where .ListViewItem is a virtual
> class.
>
> Thanks
>

Virtual class is a way to have access to sub object of a class (ie internal 
object not instanciable) like you can have in treeview (or listview)

------------
DIM hTreeView AS TreeView
' DIM hTreeViewItem AS .TreeViewItem

hTreeView = NEW TreeView (ME)
....
' want to access an item of the treeview
theKey = hTreeView.Item.Key
' is the same (but not allowed)
' hTreeViewItem = hTreeView.Item
' theKey = hTreeViewItem.Key
------------

In fact, virtual class is only for internal use and can be use for other 
purpose :-) it's only useful for making component in C/C++ (actually). 

Regards,

-- 
jabber : lordheavy at ...943...
mail : lordheavymREMOVEME at ...626...





More information about the User mailing list