API: Basic Controls

Riferimento API per i control UI fondamentali.

TWvdSLabel

Visualizzazione testo senza interazione.

Namespace

WvdS.UI.Controls.Basic

Sintassi

TWvdSLabel = class(TWvdSControl)

PXAML

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

Properties

Property Tipo Default Descrizione
Text string | Testo da visualizzare | ^ FontWeight | TWvdSFontWeight | fwNormal | Normal, Bold | ^ FontStyle | TWvdSFontStyle | fsNormal | Normal, Italic | ^ Foreground | TWvdSColor | clDefault | Colore testo | ^ TextWrapping | TWvdSTextWrapping | twNoWrap | NoWrap, Wrap, WrapWithOverflow | ^ TextAlignment | TWvdSTextAlignment | taLeft | Left, Center, Right | ==== Events ==== Nessuno (non interattivo). —- ===== TWvdSButton ===== Pulsante standard per azioni utente. ==== Namespace ==== WvdS.UI.Controls.Basic ==== Sintassi ==== <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 | Tipo | Default | Descrizione | ^ Caption | string | Testo pulsante
IsDefault Boolean False Tasto Enter attiva Click
IsCancel Boolean False Tasto Escape attiva Click
IsEnabled Boolean True Abilitato/Disabilitato
Command IWvdSCommand nil Command bindato
CommandParameter TValue nil Parametro per Command
ImageSource TWvdSImageSource nil Icona opzionale

Events

Event Firma Descrizione
OnClick TNotifyEvent Pulsante cliccato

Esempio

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

TWvdSTextBox

Campo testo semplice a riga singola.

Namespace

WvdS.UI.Controls.Basic

Sintassi

TWvdSTextBox = class(TWvdSControl)

PXAML

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

Properties

Property Tipo Default Descrizione
Text string | Testo attuale | ^ PlaceholderText | string | Testo segnaposto
MaxLength Integer 0 Max. caratteri (0=illimitato)
IsReadOnly Boolean False Modalita sola lettura
IsPassword Boolean False Modalita password (*)
SelectionStart Integer 0 Posizione cursore
SelectionLength Integer 0 Caratteri selezionati

Events

Event Firma Descrizione
OnTextChanged TNotifyEvent Testo modificato
OnKeyDown TKeyEventHandler Tasto premuto

TWvdSCheckBox

Casella di controllo per valori booleani.

Namespace

WvdS.UI.Controls.Basic

PXAML

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

Properties

Property Tipo Default Descrizione
Content string | Etichetta | ^ IsChecked | Boolean? | False | Checked, Unchecked, Indeterminate | ^ IsThreeState | Boolean | False | Terzo stato permesso | ==== Events ==== | Event | Firma | Descrizione | ^ OnCheckedChanged | TNotifyEvent | Stato modificato | —- ===== TWvdSRadioButton ===== Pulsante opzione per selezione mutuamente esclusiva. ==== 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 | Tipo | Default | Descrizione | ^ Content | string | Etichetta
IsChecked Boolean False Selezionato
GroupName string | Nome gruppo | ==== Events ==== | Event | Firma | Descrizione | ^ OnCheckedChanged | TNotifyEvent | Selezione modificata | —- ===== TWvdSImage ===== Visualizzazione immagine. ==== 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 | Tipo | Default | Descrizione | ^ Source | TWvdSImageSource | nil | Sorgente immagine | ^ Stretch | TWvdSStretch | sNone | None, Fill, Uniform, UniformToFill | ==== Nota TUI ==== <note>Nel target TUI viene usato Kitty Graphics o Sixel. Fallback: Placeholder con cornice.</note> —- ===== TWvdSProgressBar ===== Barra di avanzamento. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <ProgressBar Value=„{Binding Progress}“ Minimum=„0“ Maximum=„100“ /> <ProgressBar IsIndeterminate=„True“ /> </code> ==== Properties ==== | Property | Tipo | Default | Descrizione | ^ Value | Double | 0 | Valore attuale | ^ Minimum | Double | 0 | Valore minimo | ^ Maximum | Double | 100 | Valore massimo | ^ IsIndeterminate | Boolean | False | Modalita indeterminata | ^ Orientation | TWvdSOrientation | oHorizontal | Horizontal, Vertical | —- ===== TWvdSSlider ===== Slider per selezione valori. ==== 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 | Tipo | Default | Descrizione | ^ Value | Double | 0 | Valore attuale | ^ Minimum | Double | 0 | Valore minimo | ^ Maximum | Double | 100 | Valore massimo | ^ SmallChange | Double | 1 | Passo piccolo | ^ LargeChange | Double | 10 | Passo grande | ^ TickFrequency | Double | 0 | Distanza tick | ^ IsSnapToTickEnabled | Boolean | False | Aggancia ai tick | ^ Orientation | TWvdSOrientation | oHorizontal | Horizontal, Vertical | ==== Events ==== | Event | Firma | Descrizione | ^ OnValueChanged | TNotifyEvent | Valore modificato | —- ===== TWvdSToggleButton ===== Interruttore On/Off. ==== Namespace ==== WvdS.UI.Controls.Basic ==== PXAML ==== <code xml> <ToggleButton IsChecked=„{Binding DarkMode}“ ContentOn=„ON“ ContentOff=„OFF“ /> </code> ==== Properties ==== | Property | Tipo | Default | Descrizione | ^ IsChecked | Boolean | False | Stato On/Off | ^ ContentOn | string | 'ON' | Testo quando On | ^ ContentOff | string | 'OFF' | Testo quando Off | ==== Events ==== | Event | Firma | Descrizione | ^ OnToggled | TNotifyEvent | Stato cambiato | —- ===== TWvdSHyperlink ===== Link cliccabile. ==== 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 | Tipo | Default | Descrizione | ^ Text | string | Testo link
NavigateUri string

PXAML

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

Properties

Property Tipo Default Descrizione
Orientation TWvdSOrientation oHorizontal Horizontal, Vertical
Stroke TWvdSBrush nil Colore linea
StrokeThickness Double 1 Spessore linea

Vedi anche

Zuletzt geändert: il 29/01/2026 alle 22:34