1. Control element TitleItem

    Article: AN0001751Updated: 12.10.2018

    This control element is used to display a title (label) for an input control (e.g. TextItem).

    Properties

    Name Description
    bool ShowCheckbox Indication, whether a checkbox should be displayed in front of the titel.
    string Text Title text.
    string Description Description, that is displayed below the title.
    bool ShowTitle Indication, whether the title should be displayed.
    bool Mandatory Indication, whether the title is mandatory.
    bool TitleIsLink Indication, whether the title is clickable.
    string ClientClick JS, that will be executed after clicking on the title.
    bool IsChecked Indication, whether checkbox in front of the title is checked.
    string Help Help to the title.

    If property ShowTitle = false is set up, then the title is not displayed but the room for the title is kept in the screen and therefore other control elements are not moved.

    If property TitleIsLink is set up, then set up also property ClientClick.

    Example

    This example creates a group in the form, adds into it a row and two columns. Two text fields with titles (TitleItem) are added to the columns.

      gi = OGForm.CreateOGGroup( 'gicontakt', 'Contact data', false, false);
      OGForm.AddControl( gi);

      var r = OGForm.CreateRow();
      var c1 = OGForm.CreateCol(false);
      var c2 = OGForm.CreateCol(false);

      var ti1 = OGForm.CreateOGTitle('ti1', 'Name and surname', true);
      var t1 = OGForm.CreateOGText( 'tName', true, null);
      var ti2 = OGForm.CreateOGTitle('ti2', 'Email', true, null);
      var t2 = OGForm.CreateOGText( 'tEmail', false, null);

      c1.Controls.Add( OGForm.CreateItem(ti1, t1));
      c2.Controls.Add( OGForm.CreateItem(ti2, t2));
      r.Controls.Add(c1);
      r.Controls.Add(c2);
      gi.Controls.Add(r);

×