d.bernaert Posted January 16, 2020 Share Posted January 16, 2020 Hi, I have a form with client alignment. It contains a containerpanel with 2 child containerpanels. The lay-out is border. The left child has region west and the right child has region center. I activated the split so that the left child can be resized and the right child is resized also. Now I would like to store the width of the left child so that the user can select the desired with by draggin the splitter and when he enters the module again the selected with is restored. How can I do this? Thx, Dominique Quote Link to comment Share on other sites More sharing options...
CristianPeta Posted September 4, 2020 Share Posted September 4, 2020 (edited) I have the same question. Has someone found a solution for this? I've found a solution: the width of the left child is coming in child's OnResize event in Sender.Width Edited September 4, 2020 by CristianPeta found it Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 4, 2020 Share Posted September 4, 2020 Hello, One of the possible solutions, using the server side (the database will be used). 1. procedure TMainForm.UniPanel1Resize(Sender: TUniControl; OldWidth, OldHeight: Integer); begin //Writing to the database //(Sender as TUniPanel).Width end; 2. procedure TMainForm.UniFormCreate(Sender: TObject); begin //Reading from DB UniPanel1.Width := xx; end; Quote Link to comment Share on other sites More sharing options...
CristianPeta Posted September 4, 2020 Share Posted September 4, 2020 Thank you. I just found this and also I need to put a uniDBGrid into a panel because uniDBGrid doesn't have OnResize event (or is not exposed?). The values I will save into the cookies. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 4, 2020 Share Posted September 4, 2020 17 minutes ago, CristianPeta said: and also I need to put a uniDBGrid into a panel Panel.Layout = fit Of course we mean we are using AlignmentClient. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.