|
|
|
|
|
- Declaración de una variable de control
- Asignación de una variable de control
- Utilización de una variable de control en un procedimiento
- Optimización de los procesos con indirección
- Propiedades asociadas a una variable de Control
- Funciones que utilizan una variable de control
En Control se utiliza para definir las características de un control. Este control puede ser creado dinámicamente por ControlCreate o un control en una ventana o informe. Nota: Para obtener más información sobre la declaración de este tipo de variable y el uso de propiedades WLanguage, consulte Declarar una variable. Observaciones Declaración de una variable de control La siguiente sintaxis se utiliza para declarar una variable de Control: <Variable name> is Control Ejemplo: En la declaración de una variable de tipo Control, puede especificar el tipo de control utilizando la siguiente sintaxis:<Variable name> is Control <control type = <Control type>> donde <Control type> es la constante que corresponde al tipo de control que se va a crear (véase más abajo). Ejemplo: MonChamp is Control <control type = typButton>
Las siguientes constantes pueden utilizarse para definir el tipo de control: | | | typActiveX | 17 | ActiveX control
| typOrganizer | 76 | Organizer control
| typScrollbar | 18 | Scrollbar control
| typAttribute | 41 | Attribute of a Looper control
| typSlidingBanner | 122 | Sliding Banner control
| typNavigationBar | 117 | Navigation Bar control
| typToolbar | 22 | Toolbar control
| typToolbox | 29 | Sidebar control
| typButton | 4 | Button control | Novedad versión 2025typSegmentedButton | 148 | Segmented Button control
| typCalendar | 47 | Calendar control
| typCaptcha | 82 | Captcha control
| typMap | 92 | Map control
| typCarousel | 37 | Carousel control
| typStatusBarBox | 40002 | Cells of a status bar
| typCell | 50014 | Cell control
| typCellCSSGrid | 147 | Cell control in a CSS Grid control. | typNavigationBarCell | 115 | Cell control in a Navigation Bar control.
| typCellLayout | 127 | Cell in a Layout control | typCelluleFlexBox | 139 | Cell of a FlexBox control. | typCellPageLayout | 84 | Cell control used for the Zoning layout.
| typFormattedControl | 50001 | Formatted display control
| typHTMLControl | 50002 | HTML control
| typMenuControl | 50007 | Menu of a WEBDEV page
| typContextMenuControl | 141 | Context menu in a WEBDEV page
| typBreadcrumb | 50011 | Breadcrumb control
| typClick | 30001 | Clickable Image control (Image control with the "This image is a clickable area" option).
| typBarCode | 26 | Bar Code control
| typColumn | 56 | Table column
| typComboWE | 10001 | Editable Combo Box control
| typComboNE | 10002 | Non-editable Combo Box control
| typWebComponent | 121 | Web Component control | typConference | 25 | Conference control
| typNativeContainer | 125 | Native Container control
| typCube | 38 | Cube control
| typDate | 20002 | Date Edit control
| typLayout | 126 | Layout control
| typDuration | 20006 | Duration Edit control
| typDiagramEditor | 130 | Diagram Editor control
| typCodeEditor | 146 | Code Editor control
| typHtmlEditor | 134 | HTML Editor control
| typImageEditor | 124 | Image Editor control
| typMobileImageEditor | 138 | Mobile Image Editor control
| typWin | 1 | Window
| typInternalWindow | 31 | Internal Window
| typWire | 118 | Wire control
| typFlash | 50008 | Flash control
| typFlex | 48 | Flex control
| typFlexbox | 139 | Flexbox control
| typShape | 20 | Shape/Drawing control
| typGantt | 110 | Gantt Chart column (Table or TreeView Table control).
| typChart | 33 | Chart control in a window or page
| typGrp | 58 | Group of controls
| typTime | 20003 | Time Edit control
| typHTML | 23 | HTML static
| typIFrame | 50013 | IFrame control
| typImage | 8 | Image control | typCheckBox | 5 | Check Box control
| typSwitch | 132 | Switch control
| typProgressBar | 10 | Progress Bar control
| typInfiniteProgressBar | 113 | Infinite Progress Bar control
| typJava | 50004 | Java control
| typKanban | 140 | Kanban control
| typPDFReader | | PDF Reader control
| typStatic | 3 | Static Text control | typHTMLStatic | 50006 | HTML Static control
| typLink | 50005 | Link control
| typSocialLink | 103 | Social Network control
| typHorizontalRule | 50003 | Line control
| typList | 7 | List Box control
| typListView | 27 | ListView control
| typKanbanList | 142 | Kanban List control
| typMapArea | 50010 | Clickable Image control
| typControlTemplate | 43 | Control Template control. | typCurrency | 20005 | Currency Edit control
| typMultimedia | 39 | Multimedia control
| typRating | 85 | Rating control
| typRepositionableNote | 119 | Repositionable Note control
| typNum | 20004 | Numeric Edit control
| typOle | 15 | OLE control
| typTab | 16 | Tab control
| typSwitchOption | 133 | Option of a Switch control
| typMenuOption | 40001 | Menu option
| typOrganizationChart | 86 | Organization Chart control
| typPage | 1 | Page
| typPeelingCorner | 79 | Peeling Corner control
| typInternalPage | 31 | Internal page
| typPanel | 131 | Dockable Panel control
| typSlidingBannerPlane | 123 | Plane associated with a Sliding Banner control
| typSiteMap | 45 | Site Map control
| typScheduler | 80 | Scheduler
| typPopup | 90 | Popup page
| typSlider | 12 | Slider control
| typRangeSlider | 72 | Range Slider
| typRotativeSlider | 13 | Round Slider
| typRangeSlider | 72 | Range Slider control
| typPager | 50009 | Pager control
| typRibbonGroup | | Ribbon group
| typRibbon | 87 | Ribbon control
| typBreak | | Break in a Looper control
| typRadioButton | 6 | Radio Button control | typSplitter | 28 | Splitter control
| typSilverlight | 46 | SilverLight control
| typSpin | 11 | Spin control
| typSuperControl | 40 | Supercontrol | typTable | 9 | Table control
| typPivotTable | 102 | Pivot Table control
| typDashboard | 111 | Dashboard control
| typTreeviewTable | 35 | TreeView Table control
| typSpreadsheet | 114 | Spreadsheet control
| typText | 20001 | Text Edit control
| typDrawer | 34 | Drawer control
| typWordProcessing | 120 | Word Processing control
| typTreeMap | 74 | TreeMap control
| typTreeView | 19 | TreeView control
| typUpload | 73 | Upload control
| typVideo | 78 | Video control
| typThumbnail | 50012 | Thumbnail control
| typWebCam | 24 | Web Camera control
| typXaml | 36 | Xaml control
| typMultilineZone | 97 | Multiline Zone control
| typLooper | 30 | Looper control
| typLinearLooper | 77 | Linear Looper control
| typRichTextArea | 109 | Text Area control
|
Nota: Para dejar de asociar un control a una variable de tipo Control, basta con utilizar VariableReset. Asignación de una variable de control A Control puede utilizarse para controlar: - un control en una ventana o en un informe.
La asignación de una variable de Control debe realizarse mediante el operador '<-'. Ejemplos:
c is Control
c <- SAI_Saisie1
Precaución: El operador '=' no debe utilizarse para asignar un valor a una variable de tipo Control. Este operador se utiliza para transferir el valor de un control a otro control del mismo tipo. Por ejemplo:
c is Control
c <- SAI_Saisie1
c = SAI_Saisie3
c = "Texte"
Nota: Para determinar si se ha asignado un valor a una variable de tipo Controlutilice la propiedad Tipo de la variable. Ejemplo: PROCEDURE VariableChampEstAffecté(varChamp is Control) : boolean
sType is int
WHEN EXCEPTION IN
sType = varChamp..Type
DO
RETURN False
END
RETURN True
Utilización de una variable de control en un procedimiento En Control puede ser un parámetro de un procedimiento. Método 1: Sintaxis sin el tipo del control: - código de procedimiento:
PROCEDURE MaProcédure(C is Control)
C = "Il est " + TimeSys()
- llamada al procedimiento:
En este caso, el tipo del control no se comprueba en tiempo de compilación. Método 2: Sintaxis con el tipo de control:- código de procedimiento:
PROCEDURE MaProcédure(C is Control <control type = typSaisie>)
C = "Il est " + TimeSys()
- llamada al procedimiento:
Ventaja: Si la llamada al procedimiento utiliza un control de un tipo inesperado, se muestra un error de compilación: "El tipo de control pasado como parámetro no es compatible con el tipo esperado" Optimización de los procesos con indirección En Control puede utilizarse para optimizar los procesos que utilizan las indirecciones. Puedes escribir, por ejemplo: C is Champ <-{s, indControl}
C.Largeur = 10
C.Hauteur = 20
en lugar del siguiente código: {s, indControl}..Width = 10
{s, indControl}..Height = 20
Propiedades asociadas a una variable de Control En Control se utiliza para manipular todos los tipos de controles que se encuentran en una ventana o en un informe. Las propiedades disponibles dependen del tipo de control utilizado. Por ejemplo, si una variable de tipo Control se utiliza para manipular un control Campo de entrada, todas las propiedades WLanguage del control Campo de entrada estarán disponibles para esa variable.
Especificando el tipo de control al declarar la función Control sólo se sugerirán las propiedades de ese tipo en el editor de código. Para obtener más información sobre las propiedades de un control, vaya a la página correspondiente y haga clic en "Ver también". Para obtener más información, consulte Controles de ventana. Funciones que utilizan una variable de control Todas las funciones WLanguage que manipulan controles pueden utilizarse en una variable de tipo Control. Sin embargo, sólo estarán disponibles las funciones WLanguage correspondientes al tipo de control utilizado.
Especificando el tipo de control al declarar la función Control sólo se sugerirán las funciones de ese tipo en el editor de código.Por ejemplo, si una variable de tipo Control se utiliza para manipular un control Tabla, todas las funciones TableXXX estarán disponibles para esa variable.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|