Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#2

Re: TbsSkinComboBox OnDrawEvent

  Alt 10. Feb 2008, 20:32
Delphi-Quellcode:
procedure bsSkinComboBoxListBoxDrawItem(Sender: TbsSkinComboBox; Cnvs: TCanvas; Index,
  ItemWidth, ItemHeight: Integer; TxtRect: TRect; State: TOwnerDrawState);
begin
  //..
end;

procedure TForm1.bsSkinComboBox1ListBoxDrawItem(Cnvs: TCanvas; Index,
  ItemWidth, ItemHeight: Integer; TxtRect: TRect; State: TOwnerDrawState);
begin
 bsSkinComboBoxListBoxDrawItem(bsSkinComboBox1, Cnvs, Index, ItemWidth, ItemHeight, TxtRect, State);
end;

procedure TForm1.bsSkinComboBox2ListBoxDrawItem(Cnvs: TCanvas; Index,
  ItemWidth, ItemHeight: Integer; TxtRect: TRect; State: TOwnerDrawState);
begin
  bsSkinComboBoxListBoxDrawItem(bsSkinComboBox2, Cnvs, Index, ItemWidth, ItemHeight, TxtRect, State);
end;
(Auch wenn der Thread schon älter ist

Es gibt glaub keine andere Möglichkeit, als jeder Komponente ein OnListBoxDrawItem zuzuweisen und dann den jeweiligen Sender einer allgemeinen Funktion zu übergeben
Thomas
  Mit Zitat antworten Zitat