Treeview problem

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ALG.

Hi All,

I'm trying to create a treeview that is filled with information from several arrays of structures, and when you double click on an item a editbox comes up so you can edit the underlying data in the arrays.

The filling up the treeview with data is easy enough but I can't figure out a way of accessing the array data when the only information I'll have is the treeview item name/number that was clicked on.

Any help would be much appreciated.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

You can map your array, with the treeview item index, so one item is directly inside your array. Does it makes sens ?

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ALG.

Hi Fred,

I think I know what you mean but unfortunately the treeview actually gets it's data from more than one array plus some standard variables.

I was thinking I could make a array with an element for each treeview item and point each element at the address of the variable required i.e.
*ptr(0) = @file\version
*ptr(1) = @brush(0)\name
*ptr(2) = @#max_textures
I know this doesn’t work but is something like this possible?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Yes, it should work. At least it's the right useable of pointers.

Fred - AlphaSND
Post Reply