Delphi2005で開発しています。
TDBComboBoxでフォーカスが外れると、コントロール内にアンダーラインが
表示されます。
これを表示させないようにするには
どのようにすればよいでしょうか?
DBComboBoxにアンダーラインが表示される
https://www.petitmonte.com/bbs/answers?question_id=6103
では、
>XPテーマに対応するためXPManifestをフォームに置くと
とありますが、XPManifestはお使いですか?
DBCtrls.pas の
procedure TDBComboBox.WMPaint(var Message: TWMPaint);
内の
if Child <> 0 then
begin
Windows.GetClientRect(Child, R);
Windows.MapWindowPoints(Child, FPaintControl.Handle, R.TopLeft, 2);
GetWindowOrgEx(Message.DC, P);
SetWindowOrgEx(Message.DC, P.X - R.Left, P.Y - R.Top, nil);
IntersectClipRect(Message.DC, 0, 0, R.Right - R.Left, R.Bottom - R.Top);
//SendMessage(Child, WM_PAINT, Message.DC, 0);
Canvas := TCanvas.Create;
Canvas.Handle := Message.DC;
Canvas.Brush.Color := Color;
Canvas.FillRect(Rect(0,0,R.Right,R.Bottom));
Canvas.Font.Assign(Font);
Canvas.TextOut(0,0,S);
Canvas.Free;
end;
として自分で描画すれば出来る
ツイート | ![]() |