tpagecontrol

close button of a tabsheet not supporting vcl styles

我的梦境 提交于 2019-12-01 06:22:17
I have used the code provided in this example How to implement a close button for a TTabsheet of a TPageControl to draw a close button to each tabsheet of a pagecontrol and I have replaced ThemeServices with Style Services inside the code and when applying styles the close button doesn`t show and react in no way. Could anyone point me to a different path o solving this issue. thank you! this is the code of the OnDrawTab event: procedure TFormMain.PageControlCloseButtonDrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); var CloseBtnSize: Integer;

close button of a tabsheet not supporting vcl styles

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 05:16:53
问题 I have used the code provided in this example How to implement a close button for a TTabsheet of a TPageControl to draw a close button to each tabsheet of a pagecontrol and I have replaced ThemeServices with Style Services inside the code and when applying styles the close button doesn`t show and react in no way. Could anyone point me to a different path o solving this issue. thank you! this is the code of the OnDrawTab event: procedure TFormMain.PageControlCloseButtonDrawTab(Control:

How can I reduce PageControl flicker in Delphi?

主宰稳场 提交于 2019-11-30 13:34:12
In Delphi 2009 I found that the flicker of a PageControl - which occurs during resizing of the form - can be reduced by setting its DoubleBuffered property to true. However if I add controls to the PageControl tabsheets, they will flicker regardless of their DoubleBuffered property setting. I have also tried with and without runtime themes enabled. Setting ParentBackground to False for components on the PageControl helped a lot. However this results in a different color of these panel components, they all have a darker background now. Maybe this can be fixed easily (without losing Theme

How can I reduce PageControl flicker in Delphi?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 19:06:41
问题 In Delphi 2009 I found that the flicker of a PageControl - which occurs during resizing of the form - can be reduced by setting its DoubleBuffered property to true. However if I add controls to the PageControl tabsheets, they will flicker regardless of their DoubleBuffered property setting. I have also tried with and without runtime themes enabled. 回答1: Setting ParentBackground to False for components on the PageControl helped a lot. However this results in a different color of these panel

How to implement a close button for a TTabsheet of a TPageControl

谁说我不能喝 提交于 2019-11-28 04:26:01
How can I implement a close button for a TTabsheet of a TPageControl like Firefox? Edit: Delphi Version: Delphi 2010 OS: Windows XP and up Now with Theme support (include Windows, UxTheme, Themes units)! type TFormMain = class(TForm) {...} private FCloseButtonsRect: array of TRect; FCloseButtonMouseDownIndex: Integer; FCloseButtonShowPushed: Boolean; {...} end; {...} procedure TFormMain.FormCreate(Sender: TObject); var I: Integer; begin PageControlCloseButton.TabWidth := 150; PageControlCloseButton.OwnerDraw := True; //should be done on every change of the page count SetLength

How to implement a close button for a TTabsheet of a TPageControl

风流意气都作罢 提交于 2019-11-27 05:21:01
问题 How can I implement a close button for a TTabsheet of a TPageControl like Firefox? Edit: Delphi Version: Delphi 2010 OS: Windows XP and up 回答1: Now with Theme support (include Windows, UxTheme, Themes units)! type TFormMain = class(TForm) {...} private FCloseButtonsRect: array of TRect; FCloseButtonMouseDownIndex: Integer; FCloseButtonShowPushed: Boolean; {...} end; {...} procedure TFormMain.FormCreate(Sender: TObject); var I: Integer; begin PageControlCloseButton.TabWidth := 150;

TLabel and TGroupbox Captions Flicker on Resize

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 18:32:24
So, I have an application that loads different plugins and creates a new tab on a TPageControl for each one. Each DLL has a TForm associated with it. The forms are created with their parent hWnd as the new TTabSheet. Since the TTabSheets aren't a parent of the form as far as VCL is concerned ( didn't want to use dynamic RTL, and plugins made in other languages ) I have to handle resizes manually. I do this like below: var ChildHandle : DWORD; begin If Assigned(pcMain.ActivePage) Then begin ChildHandle := FindWindowEx(pcMain.ActivePage.Handle, 0, 'TfrmPluginForm', nil); If ChildHandle > 0 Then

TLabel and TGroupbox Captions Flicker on Resize

…衆ロ難τιáo~ 提交于 2019-11-26 06:28:01
问题 So, I have an application that loads different plugins and creates a new tab on a TPageControl for each one. Each DLL has a TForm associated with it. The forms are created with their parent hWnd as the new TTabSheet. Since the TTabSheets aren\'t a parent of the form as far as VCL is concerned ( didn\'t want to use dynamic RTL, and plugins made in other languages ) I have to handle resizes manually. I do this like below: var ChildHandle : DWORD; begin If Assigned(pcMain.ActivePage) Then begin