Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/19/24 in all areas

  1. Mark Williams

    TTabControl OwnerDraw Styled

    Managed to work out a solution in the end. Sure there will be some issues I haven't considered, but seems to work ok. If anyone is interested here's the code: procedure TForm3.TabControl2DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); var TabName:String; Pt : TPoint; R: TRect; TabUnderMouse:Integer; begin Pt := TabControl2.ScreenToClient(Mouse.CursorPos); TabUnderMouse := TabControl1.IndexOfTabAt(Pt.X, Pt.Y); with (Control as TTabControl).canvas do begin R := Rect; if TabIndex=1 then Font.Style := [fsStrikeout]; if (TabUnderMouse = TabIndex)and Active then Font.Color := TStyleManager.ActiveStyle.GetStyleFontColor(sfTabTextActiveHot) else if Active then Font.Color := TStyleManager.ActiveStyle.GetStyleFontColor(sfTabTextActiveNormal) else if (TabUnderMouse = TabIndex) then Font.Color := TStyleManager.ActiveStyle.GetStyleFontColor(sfTabTextInActiveHot) else Font.Color := TStyleManager.ActiveStyle.GetStyleFontColor(sfTabTextInActiveNormal); tabName := TTabControl(Control).Tabs[TabIndex]; Brush.Style := bsClear; DrawText(Handle, PChar(TabName), Length(TabName), R, DT_SINGLELINE or DT_VCENTER or DT_CENTER) end; end;
  2. Dmitry Arefiev

    TFDUpdateSQL Problem

    @VLDG, thanks ! Yes, this is the issue in FireDAC support for Firebird 5. The issue is fixed, the changes will be included into Delphi 12 Update 1.
×