API: Basic Controls

API Reference for basic UI controls.

TWvdSLabel

Text display without interaction.

Namespace

WvdS.UI.Controls.Basic

Syntax

TWvdSLabel = class(TWvdSControl)

PXAML

<Label Text="Hello World" />
<Label Text="{Binding CustomerName}" FontWeight="Bold" />

Properties

Property Type Default Description
Text string | Displayed text | ^ FontWeight | TWvdSFontWeight | fwNormal | Normal, Bold | ^ FontStyle | TWvdSFontStyle | fsNormal | Normal, Italic | ^ Foreground | TWvdSColor | clDefault | Text color | ^ TextWrapping | TWvdSTextWrapping | twNoWrap | NoWrap, Wrap, WrapWithOverflow | ^ TextAlignment | TWvdSTextAlignment | taLeft | Left, Center, Right | ==== Events ==== None (non-interactive). —- ===== TWvdSButton ===== Standard button for user actions. ==== Namespace ==== WvdS.UI.Controls.Basic ==== Syntax ==== <code pascal> TWvdSButton = class(TWvdSControl) </code> ==== PXAML ==== <code xml> <Button Caption=„OK“ OnClick=„OnOkClick“ /> <Button Caption=„Save“ Command=„{Binding SaveCommand}“ IsDefault=„True“ /> <Button Caption=„Cancel“ IsCancel=„True“ /> </code> ==== Properties ==== | Property | Type | Default | Description | ^ Caption | string | Button text
IsDefault Boolean False Enter key triggers Click
IsCancel Boolean False Escape key triggers Click
IsEnabled Boolean True Enabled/Disabled
Command IWvdSCommand nil Bound command
CommandParameter TValue nil Parameter for command
ImageSource TWvdSImageSource nil Optional icon

Events

Event Signature Description
OnClick TNotifyEvent Button was clicked

Example

procedure TMainWindow.OnSaveClick(Sender: TObject);
begin
  if ValidateForm then
    SaveData;
end;

TWvdSTextBox

Simple single-line text field.

Namespace

WvdS.UI.Controls.Basic

Syntax

TWvdSTextBox = class(TWvdSControl)

PXAML

<TextBox Text="{Binding Username, Mode=TwoWay}" />
<TextBox Text="" PlaceholderText="Enter name..." MaxLength="50" />
<TextBox Text="" IsReadOnly="True" />

Properties

Property Type Default Description
Text string | Current text | ^ PlaceholderText | string | Placeholder text
MaxLength Integer 0 Max characters (0=unlimited)
IsReadOnly Boolean False Read-only mode
IsPassword Boolean False Password mode (*)
SelectionStart Integer 0 Cursor position
SelectionLength Integer 0 Selected characters

Events

Event Signature Description
OnTextChanged TNotifyEvent Text was changed
OnKeyDown TKeyEventHandler Key pressed

TWvdSCheckBox

Checkbox for Boolean values.

Namespace

WvdS.UI.Controls.Basic

PXAML

<CheckBox Content="Remember me" IsChecked="{Binding RememberMe}" />
<CheckBox Content="I agree" IsThreeState="False" />

Properties

Property Type Default Description
Content string | Label | ^ IsChecked | Boolean? | False | Checked, Unchecked, Indeterminate | ^ IsThreeState | Boolean | False | Third state allowed | ==== Events ==== | Event | Signature | Description | ^ OnCheckedChanged | TNotifyEvent | State changed | —- ===== TWvdSRadioButton ===== Radio button for mutually exclusive selection. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <StackPanel> <RadioButton Content=„Option A“ GroupName=„options“ IsChecked=„True“ /> <RadioButton Content=„Option B“ GroupName=„options“ /> <RadioButton Content=„Option C“ GroupName=„options“ /> </StackPanel> </code> ==== Properties ==== | Property | Type | Default | Description | ^ Content | string | Label
IsChecked Boolean False Selected
GroupName string | Group name | ==== Events ==== | Event | Signature | Description | ^ OnCheckedChanged | TNotifyEvent | Selection changed | —- ===== TWvdSImage ===== Image display. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <Image Source=„logo.png“ Width=„100“ Height=„100“ /> <Image Source=„{Binding ProductImage}“ Stretch=„Uniform“ /> </code> ==== Properties ==== | Property | Type | Default | Description | ^ Source | TWvdSImageSource | nil | Image source | ^ Stretch | TWvdSStretch | sNone | None, Fill, Uniform, UniformToFill | ==== TUI Note ==== <note>In TUI target, Kitty Graphics or Sixel is used. Fallback: placeholder with border.</note> —- ===== TWvdSProgressBar ===== Progress indicator. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <ProgressBar Value=„{Binding Progress}“ Minimum=„0“ Maximum=„100“ /> <ProgressBar IsIndeterminate=„True“ /> </code> ==== Properties ==== | Property | Type | Default | Description | ^ Value | Double | 0 | Current value | ^ Minimum | Double | 0 | Minimum value | ^ Maximum | Double | 100 | Maximum value | ^ IsIndeterminate | Boolean | False | Indeterminate mode | ^ Orientation | TWvdSOrientation | oHorizontal | Horizontal, Vertical | —- ===== TWvdSSlider ===== Slider for value selection. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <Slider Value=„{Binding Volume}“ Minimum=„0“ Maximum=„100“ /> <Slider Value=„50“ TickFrequency=„10“ IsSnapToTickEnabled=„True“ /> </code> ==== Properties ==== | Property | Type | Default | Description | ^ Value | Double | 0 | Current value | ^ Minimum | Double | 0 | Minimum value | ^ Maximum | Double | 100 | Maximum value | ^ SmallChange | Double | 1 | Small step | ^ LargeChange | Double | 10 | Large step | ^ TickFrequency | Double | 0 | Tick spacing | ^ IsSnapToTickEnabled | Boolean | False | Snap to ticks | ^ Orientation | TWvdSOrientation | oHorizontal | Horizontal, Vertical | ==== Events ==== | Event | Signature | Description | ^ OnValueChanged | TNotifyEvent | Value changed | —- ===== TWvdSToggleButton ===== On/Off switch. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <ToggleButton IsChecked=„{Binding DarkMode}“ ContentOn=„ON“ ContentOff=„OFF“ /> </code> ==== Properties ==== | Property | Type | Default | Description | ^ IsChecked | Boolean | False | On/Off state | ^ ContentOn | string | 'ON' | Text when On | ^ ContentOff | string | 'OFF' | Text when Off | ==== Events ==== | Event | Signature | Description | ^ OnToggled | TNotifyEvent | State toggled | —- ===== TWvdSHyperlink ===== Clickable link. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <Hyperlink NavigateUri=„https://example.com“ Text=„Visit Website“ /> <Hyperlink Command=„{Binding OpenHelpCommand}“ Text=„Help“ /> </code> ==== Properties ==== | Property | Type | Default | Description | ^ Text | string | Link text
NavigateUri string

PXAML

<StackPanel>
  <Button Caption="Item 1" />
  <Separator />
  <Button Caption="Item 2" />
</StackPanel>

Properties

Property Type Default Description
Orientation TWvdSOrientation oHorizontal Horizontal, Vertical
Stroke TWvdSBrush nil Line color
StrokeThickness Double 1 Line thickness

See Also

Zuletzt geändert: on 2026/01/29 at 10:30 PM