Forum Replies Created
-
AuthorPosts
-
May 17, 2023 at 1:01 am in reply to: Problem of RzSizePanel on right side with custom aligned panel (Align=clCustom) #3519
Sorry for my late reply,
I confirmed the patch fixes the problem as you suggested.
https://gist.github.com/benok/d88edc97629716173b4cef598a54498d#file-rzsplit_workaround-patch
Thank you again for your suggestion.
You saved my time 🙂May 10, 2023 at 5:43 am in reply to: Problem of RzSizePanel on right side with custom aligned panel (Align=clCustom) #3517Thank you for your advice.
My production app is MDI base and it’s important for me to use this layout, so I’ll try the latter suggestion next week.
Another option would be to modify the TRzCustomSizePanel.GetParentWorkingRect method and comment out the alCustom case label in the middle of the method. This would eliminate the range check for the alCustom panel and then the size panel would be able to be dragged over the sub-panel.
I’m happy to see a solution in sight 🙂
May 9, 2023 at 11:31 pm in reply to: Problem of RzSizePanel on right side with custom aligned panel (Align=clCustom) #3512Thank you for commenting about debugging.
I want to make time to debug, but I think it’s very difficult this week…
I added the animation gif to the gist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program RzSizePanelTest; uses Vcl.Forms, Unit1 in 'Unit1.pas' {Form1}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
— C:/Users/Public/Documents/Embarcadero/Studio/21.0/CatalogRepository/KonopkaControls-270-6.2.3/Source_Copy/RzSplit.pas Tue Jun 9 03:51:42 2020 +++ C:/Users/Public/Documents/Embarcadero/Studio/21.0/CatalogRepository/KonopkaControls-270-6.2.3/Source/RzSplit.pas Wed May 17 13:45:14 2023 @@ -4013,15 +4013,15 @@ alLeft: Inc( Result.Left, Parent.Controls[ I ].Width ); alRight: Dec( Result.Right, Parent.Controls[ I ].Width ); – alNone, alCustom: + alNone{, alCustom}: begin case FSide of sdTop: Inc( Result.Top, Parent.Controls[ I ].Height ); sdBottom: Dec( Result.Bottom, Parent.Controls[ I ].Height );
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 636 ClientWidth = 1286 Color = clAppWorkSpace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object RzStatusBar1: TRzStatusBar Left = 0 Top = 617 Width = 1286 Height = 19 BorderInner = fsNone BorderOuter = fsNone BorderSides = [sdLeft, sdTop, sdRight, sdBottom] BorderWidth = 0 TabOrder = 0 VisualStyle = vsGradient end object RzToolbar1: TRzToolbar Left = 0 Top = 0 Width = 1286 Height = 29 BorderInner = fsNone BorderOuter = fsGroove BorderSides = [sdTop] BorderWidth = 0 TabOrder = 1 VisualStyle = vsGradient end object RzSizePanel1: TRzSizePanel Left = 0 Top = 29 Width = 202 Height = 588 HotSpotVisible = True SizeBarWidth = 7 TabOrder = 2 object btnShowInfo: TButton Left = 16 Top = 24 Width = 161 Height = 25 Caption = 'Show Info' TabOrder = 0 OnClick = btnShowInfoClick end end object RzSizePanel2: TRzSizePanel Left = 1036 Top = 29 Width = 250 Height = 588 Align = alRight HotSpotVisible = True SizeBarWidth = 7 TabOrder = 3 end object pnlInfo: TRzPanel Left = 216 Top = 35 Width = 809 Height = 43 Align = alCustom BorderOuter = fsNone Color = clInfoBk TabOrder = 4 Visible = False object lblInfo: TLabel Left = 16 Top = 16 Width = 74 Height = 13 Caption = 'Some Info Text' end object btnClose: TRzButton AlignWithMargins = True Left = 726 Top = 8 Height = 27 Margins.Top = 8 Margins.Right = 8 Margins.Bottom = 8 Align = alRight Caption = 'Close' TabOrder = 0 OnClick = btnCloseClick end end end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, RzButton, RzPanel, RzSplit, Vcl.ExtCtrls, Vcl.StdCtrls; type TForm1 = class(TForm) RzStatusBar1: TRzStatusBar; RzToolbar1: TRzToolbar; RzSizePanel1: TRzSizePanel; RzSizePanel2: TRzSizePanel; pnlInfo: TRzPanel; btnClose: TRzButton; btnShowInfo: TButton; lblInfo: TLabel; procedure btnCloseClick(Sender: TObject); procedure btnShowInfoClick(Sender: TObject); private protected procedure CustomAlignPosition(Control: TControl; var NewLeft, NewTop, NewWidth, NewHeight: Integer; var AlignRect: TRect; AlignInfo: TAlignInfo); override; public end; var Form1: TForm1; implementation {$R *.dfm} { TForm1 } procedure TForm1.CustomAlignPosition(Control: TControl; var NewLeft, NewTop, NewWidth, NewHeight: Integer; var AlignRect: TRect; AlignInfo: TAlignInfo); begin inherited; if (Control = pnlInfo) and pnlInfo.Visible then begin // Set on Top of the AlignRect NewLeft := AlignRect.Left; NewTop := AlignRect.Top; NewWidth := AlignRect.Width; NewHeight := pnlInfo.Height; // Decrease AlignRect Top Area AlignRect.Top := NewTop + NewHeight; end; end; procedure TForm1.btnShowInfoClick(Sender: TObject); begin pnlInfo.Show; end; procedure TForm1.btnCloseClick(Sender: TObject); begin pnlInfo.Hide; end; end. Is there any workaround?
-
AuthorPosts