Page 1 of 1

ID en tree

Posted: Tue Aug 30, 2016 7:30 pm
by ASESORMIX
Hola Amigos.
Me asalta una duda.
¿ para que se usa el ID en el control tree?

-------------------------------------------------------------------------

Hello friends.
I have a doubt.
So that the ID is used in the tree control?

Re: ID en tree

Posted: Tue Aug 30, 2016 7:37 pm
by ASESORMIX
Ejemplo:

DEFINE TREE Tree_1 AT 10,10 WIDTH 200 HEIGHT 400 VALUE 15

NODE 'Item 1'
TREEITEM 'Item 1.1'
TREEITEM 'Item 1.2' ID 999 <------------------------- aquí
TREEITEM 'Item 1.3'
END NODE

Re: ID en tree

Posted: Wed Aug 31, 2016 3:37 am
by andyglezl
Hola Asesormix
When ITEMIDS clause is specified, you can assign a numeric ID (ID clause) to tree items and nodes. That way, all tree properties and methods will work using these ID's instead item position.
Es un valor "fijo" que le asignas a cada item del Tree: 10,11,12,13,14,15
Si por ejemplo comentas la linea del ITEM 'Ubicación',
todos continúan con el valor asignado: 10, 11, 12, -- , 14, 15

De lo contrario (sin ID), serían: 1,2,3,4,5,6 según su posición.
si comentas la linea del ITEM 'Ubicación',
quedarían de la siguiente forma: 1,2,3,4,5 siendo 5 'Reporte Gral.' en vez de 6

Code: Select all

			NODE '[F2] • Clientes •' 				ID 10	
				TREEITEM 'Altas/Bajas/Cambios'		ID 11	
				TREEITEM 'Comentarios'			ID 12	
				// TREEITEM 'Ubicación'			ID 13	
				TREEITEM 'Enviar Correo'			ID 14
				TREEITEM 'Reporte Gral.'			ID 15
			END NODE                            	

Re: ID en tree

Posted: Wed Aug 31, 2016 3:57 pm
by ASESORMIX
Gracias andyglezl por responderme.
Ya lo tengo mas claro esta definición.