|
|
|
|
|
- Presentación
- Manipular controles Organigrama mediante programación
- Adding a root element
- Adding child elements
- Deleting an element
- Manipular un elemento en un control Organigrama
- Changing the orientation of an element
- Propiedades específicas de los controles Organigrama
Manipular controles Organigrama mediante programación (sintaxis con prefijo)
An Organization Chart control can be: - manipulated programmatically.
- linked to a data file.
This help page explains how to programmatically manipulate Organizational Chart controls. Manipular controles Organigrama mediante programación Adding a root element A root element of an organization chart is the element from which the entire tree structure is built. A "root" element can be added to an Organization Chart control with <Organization Chart>.add. This function accepts two syntaxes: - syntax for specifying element characteristics: title, image, etc, ...
Example:
ORGA_DRH.Ajoute("Emma Moutier")
Note The <Organization Chart>.add function inserts an image into the element (to the left of the text). - syntax that handles a variable of type OrgElement.
ElémentPDG is OrgElement
ElémentPDG..Title = "Big Boss"
ORGA_DIRECTION.Ajoute(ElémentPDG)
Note Using the OrgElement type allows you to configure many specific options: - tooltip,
- background color of the element,
- background image of the element,
- font of the title and content,
- orientation of the element.
Adding child elements - syntax for specifying element characteristics: title, content, etc, ...
ORGA_SansNom1.Ajoute("Emma")
ORGA_SansNom1.AjouteFils(1, "Paul Moulin")
ORGA_SansNom1.AjouteFils(1, "Florence Marcellin")
ORGA_SansNom1.AjouteFils(3, "Gilles Preau")
ORGA_SansNom1.AjouteFils(3, "Jérome Deschamps")
- syntax that handles a variable of type OrgElement.
ElémentPDG is OrgElement
ElémentPDG.Title = "Big Boss"
ORGA_DIRECTION.Ajoute(ElémentPDG)
Elément2 is OrgElement
Elément2.Title = "Production"
ORGA_DIRECTION.AjouteFils(1, Elément2)
Elément3 is OrgElement
Elément3.Title = "Vente"
ORGA_DIRECTION.AjouteFils(1, Elément3)
The BackgroundColor property of the OrgElement variable is used to define the color used to display an element. If no background color is defined, the Organization Chart control will automatically use the default color.
Deleting an element
ORGA_MonOrganigramme.Supprime(15)
Manipular un elemento en un control Organigrama The elements of an Organization Chart control are handled using their indexes. Each element of the Organization Chart control is associated with an identifier (index). This index is returned: This index is used by all functions for handling elements (selection, deletion, etc.). To handle or modify a specific element in the Organization Chart control, simply: - define a variable of type OrgElement.
- assign the desired element of the Organizational Chart control to it.
Then, the element can be handled by the OrgElement properties. For example: MyElement is OrgElement
MyElement = ORG_MyOrganizationChart[2]
Trace(MyElement.Title)
Changing the orientation of an element To change the orientation of an element in the Organization Chart control, use the Orientation90 property of the OrgElement type. Therefore, a child element can be displayed on the right of its parent. The following code is used to change the orientation of the element that was clicked:
MyElement is OrgElement
MyElement = ORG_NoName1[ORG_NoName1]
MyElement.Orientation90 = NOT MyElement.Orientation90
ORG_NoName1[ORG_NoName1] <- MyElement
Propiedades específicas de los controles Organigrama The following properties are specific to programming Organization Chart control..
| | Count | The Count property returns the number of elements in a given set. | ElementHeight | La propiedad ElementHeight permite:- Averiguar o modificar la altura de los elementos de un control Organigrama.
- Averiguar o modificar la altura de las celdas de un control Cuadro de mando.
| ElementOrientation | La propiedad ElementOrientation permite obtener y cambiar la orientación de un control Organigrama. | ElementWidth | La propiedad ElementWidth permite:- Averiguar o modificar la anchura de los elementos de un control Organigrama.
- Averiguar o modificar el ancho de las celdas de un control Cuadro de mando.
| MaxLeafPerRow | The MaxLeafPerRow property gets and sets the maximum number of elements in a row in an Organization Chart control. | Vertical | La propiedad Vertical se utiliza para:- determinar si un control está orientado horizontal o verticalmente.
- Cambia la orientación de los controles de la Mesa y del Looper (pasa de vertical a horizontal y a la inversa)..
| Zoom | La propiedad Zoom obtiene o establece el valor del zoom: - en un control Imagen.
- en un control Mapa.
- en un control Organigrama.
- en un control Tabla, Tabla TreeView, Tabla dinámica, Hoja de cálculo o List Box.
- en un control Procesador de texto.
- en un control Lector PDF.
- en un control Cámara.
- en un control Editor de diagramas;
- en una ventana.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|