Wiki-kopiopeilipalvelin

Tämä on pascal.chatin wikin peilipalvelin. Muokkaus, historia ja kirjautuminen ovat siellä.

TCheckGroup/fi

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

TCheckGroup on kontrolli, joka käsittää joukon valintaruutuja (TCheckBox) fyysisesti ja loogisesti ryhmiteltyinä säiliökomponenttiin.

Käyttö

Jos halutaan käyttää Valintaruutujen ryhmää (TCheckGroup) lomakkeella, se voidaan valita komponenttipaletin Standard tab-välilehdeltä ja asettaa se klikkaamalla lomaketta

Pieni esimerkki

Tämä esimerkki muuttaa lomakkeen taustaväriä. Tämä taustaväri määritetään lisäämällä yksittäiset värikomponentit:

pascal
procedure TForm1.cgRedItemClick(Sender: TObject; Index: integer);
var
  i, c: Integer;
begin
  c := $000000;                                         // first the color is black
  for i := 0 to 7 do begin                              // test Items 0..7 of all Checkgroups
    if cgRed.Checked[i]   then c := c + 1 shl i;        // amount of red   $000000..$0000FF
    if cgGreen.Checked[i] then c := c + 1 shl (i + 8);  // amount of green $000000..$00FF00
    if cgBlue.Checked[i]  then c := c + 1 shl (i + 16); // amount of blue  $000000..$FF0000
  end;
  Color := c;
end;

Katso myös


From the Free Pascal wiki, page "TCheckGroup/fi", 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.

Versio 2, viimeksi muokannut WikiArchive .