> How do I load a combobox
with some lines in Bold and others in
>Normal style ?
>
the easiest way is to set the style to csOwnerDrawVariable.
then dbl-click on the OnDrawItem event and write the
code for drawing items. By that, you can make the combobox to
appear whatever you want.
like this
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
if (odFocused in State) then
begin
combobox1.canvas.font.style:=[fsBold];
end else combobox1.canvas.font.style:=[];
combobox1.canvas.fillrect(rect);
combobox1.canvas.textout(rect.left,rect.top,combobox1.items[index]);
end;
this makes all focused items to be drawn in bold-style.