Page tree
Skip to end of metadata
Go to start of metadata

Either the URL to open in external browser

Introduction

The Active Text control behaves very similar to buttons, but displays either a single line of text or an image.

Usage

The dialog's currently selected Active Text control will be underlined to indicate its status. By default, the first ActiveText control is selected, but this can be controlled either via the 'default' property, or by applying ctrlSetFocus to the desired control

Properties

Only properties unique to this control type are listed. For general properties, see the Properties page.
If a property doesn't have a default value, then it must be defined explicitly.

Properties
NameTypeDefaultRemarkScript
typeInteger (constant)-Control type: 11 (or CT_ACTIVETEXT, if using constants)-
styleInteger (constant)-Display options:
  • 0 (ST_LEFT)  : Text is left-aligned.
  • 1 (ST_RIGHT)  : Text is right-aligned.
  • 2 (ST_CENTER)  : Text is centered.
  • 48 (ST_PICTURE): 'text' property points to an image.
-
actionString""Script command that is executed when the control has been clicked.
Since V3.6 the variable _this is available, and contains the control object.
buttonSetAction
blinkingPeriodFloat0If set to value > 0, the control's visibility will cycle between fully opaque and fully transparent in the number of seconds specified.-
colorColor-Text and underline color if the mouse doesn't hover over the control.ctrlSetTextColor
colorActiveColor-Text and underline color when the mouse hovers over the control, or when it is clicked.ctrlSetActiveColor
defaultBooleanfalseWhether or not this control is the dialog's initially selected active text.ctrlSetFocus
soundEnterArray Sound-The sound to play when the cursor enters the button's bounds.-
soundPushArray Sound-The sound to play when the button has been pushed.-
soundClickArray Sound-The sound to play when the button is being released.-
soundEscapeArray Sound-The sound to play when the button has been pushed and the mouse button is released outside of the control.-
textString""The text (or image) to display initially.
If the text is too long, it will be cut off - ActiveText controls do not support multi-line text, neither via style options nor line breaks.
ctrlSetText
urlString""Either the URL to open in external browser, or a path to a batch file to execute (e.g. c:\bi\scripts\dosomething.bat)-


Example

Open with createDialog "Dlg"

class Dlg {
  idd = 20000;
  movingEnable = true;

  class Controls {
    class ACTIVETEXT {
      idc = -1;
      type = 11; // CT_ACTIVETEXT;
      style = 2; // ST_CENTER;
      x = 0.75; y = 0.5;
      w = 0.2; h = 0.035;
      font = "TahomaB";
      sizeEx = 0.024;
      color[] = { 1, 1, 1, 1 };
      colorActive[] = { 1, 0.2, 0.2, 1 };
      soundEnter[] = { "", 0, 1 };   // no sound
      soundPush[] = { "", 0, 1 };
      soundClick[] = { "", 0, 1 };
      soundEscape[] = { "", 0, 1 };
      text = "Open BISim site";
      action = "hint 'Good choice!'";
      url = "http://www.bisimulations.com";
    };
  };
};