This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
OldPascalProjects/Graphics/Controls/cc13_Заголовки.pas
2024-03-10 20:32:51 +03:00

32 lines
1.1 KiB
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Модуль Controls - элементы управления с заголовками
uses Controls, GraphWPF;
begin
Window.Title := 'Модуль Controls - все элементы управления с заголовками';
LeftPanel(170, Colors.Orange);
var b := Button('Заголовки включены');
var tb := new TextBoxWPF('TextBox');
tb.Height := 40;
tb.Text := 'Несколько строк текста';
tb.Wrapping := True;
var ib := new IntegerBoxWPF('IntegerBox', 0, 10);
var lb := new ListBoxWPF('ListBox',100);
lb.AddRange('1 2 3 4 5'.ToWords);
var cb := new ComboBoxWPF('ComboBox');
cb.AddRange('1 2 3 4 5'.ToWords);
var sl := new SliderWPF('Slider:');
b.Click := procedure -> begin
if b.Text = 'Заголовки включены' then
b.Text := 'Заголовки выключены'
else b.Text := 'Заголовки включены';
tb.TitleVisible := not tb.TitleVisible;
ib.TitleVisible := not ib.TitleVisible;
lb.TitleVisible := not lb.TitleVisible;
cb.TitleVisible := not cb.TitleVisible;
sl.TitleVisible := not sl.TitleVisible;
end;
end.