Sign in Join
Wiki copytemporary

TCheckGroup/de

Deutsch · English · Français · Suomi · Русский · 中文(中国) · 日本語

Diese Seite erklärt, wie man die TCheckGroup Komponente verwendet. Auf etwas klicken bedeutet immer ein Linksklick, ein Rechtsklick wird explizit erwähnt.

Beschreibung

Eine Gruppe CheckBoxen, die der Benutzer anwählen kann. Die Komponente ist wie eine TGroupBox mit integrierten TCheckBoxen.

Verwendung

Um eine TCheckGroup auf einem Formular zu nutzen, kann man sie einfach auf der Komponentenpalette Standard auswählen und, mit einem Klick auf das Formular, platzieren.\

Kleines Beispiel

Es wird die Hintergrundfarbe eines Formulars geändert. Diese Farbe wird per Addition der einzelnen Farbanteilen bestimmt:

pascal
procedure TForm1.cgRedItemClick(Sender: TObject; Index: integer);
var
  i, c: Integer;
begin
  c := $000000;                                          // Ausgangsfarbe ist Schwarz
  for i:=0 to 7 do begin                                 // Frage Items 0..7 aller Checkgroups ab
    if cgRed.Checked[i]   then c := c + 1 shl i;         // Rotanteil  $000000..$0000FF
    if cgGreen.Checked[i] then c := c + 1 shl (i + 8);   // Grünanteil $000000..$00FF00
    if cgBlue.Checked[i]  then c := c + 1 shl (i + 16);  // Blauanteil $000000..$FF0000
  end;
  Color := c;
end;

Siehe auch

TCheckBox
TGroupBox\


From the Free Pascal wiki, page "TCheckGroup/de", as it stood on 2020-02-29 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 2, last changed by WikiArchive .

Edited on wiki.freepascal.org by 3 people, 2014–2020

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
MichlCreated page
Michladded: "Kleines Beispiel"
MichlKleines Beispiel (minor)
MathiasKleines Beispiel (minor)
TrevFixed syntax highlighting; deleted category included in page template (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.