Edwin Yip Yes. Code is very simple procedure THtComboBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); begin if odComboBoxEdit in State then begin if Assigned(ComboDoc) then ComboDoc.Draw(Canvas, Rect); end else begin if Assigned(Doc) then Doc.Draw(Canvas, Rect); end; end;
Found strange issue: maximum item height for OwnerDrawVariable combobox is 198 pixels.
ReplyDeleteHi Alex, do you mean the color grid is represented by the html code shown in the code editor. Example code will help others to understand.
ReplyDeleteEdwin Yip Yes. Code is very simple
ReplyDeleteprocedure THtComboBox.DrawItem(Index: Integer; Rect: TRect;
State: TOwnerDrawState);
begin
if odComboBoxEdit in State then begin
if Assigned(ComboDoc) then
ComboDoc.Draw(Canvas, Rect);
end else begin
if Assigned(Doc) then
Doc.Draw(Canvas, Rect);
end;
end;