Hello I create a form and put into the form two DBGrid. And set align Left to right of both. When i run the program and maximized window DBGrid width not changing. what i need to change width both of DBGrid to 50% of window?
Asked
Active
Viewed 850 times
0
-
I want do it like Total Commander two ement width by 50% width – iProgrammer May 01 '13 at 09:59
1 Answers
3
Set the left control (Control1
, say) to alLeft
and the right control (Control2
, say) to alClient
. Then create a OnResize
handler on the parent form:
procedure TForm1.FormResize(Sender: TObject);
begin
Control1.Width := ClientWidth div 2;
end;

Andreas Rejbrand
- 105,602
- 8
- 282
- 384