MichaelB2
asked on
Allow User To Design At Runtime...
I need to allow the user to design the form at runtime. ie. add a edit box or move a label. Would like to be able to allow user to link dbedit boxes to columns that they design. The part I really need help with is just allowing them to set the form up like they would like AND save it so it will come back up the next time the app is called...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This May Be A Dumb Question, But Where Do I Put The:
NameOfControl.Perform(WM_S YSCOMMAND, $f012, 0);
NameOfControl.Perform(WM_S
Here is a complete example.....
------
public
//Declare a procedure for out Button's OnMouseMove()
procedure MagicMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
//implement the code used by the proedure
procedure TForm1.MagicMouseMove(Send er: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if ssLeft in Shift then
begin
ReleaseCapture;
TControl(Sender).Perform(W M_SYSCOMMA ND, $f012, 0);
end;
end;
//form's OnCreate()
procedure TForm1.FormCreate(Sender: TObject);
var
Btn : TButton;
begin
Btn := TButton.Create(self);
with Btn do
begin
Parent := Self;
Left := 100;
Top := 100;
Width := 100;
Height := 30;
Caption := 'Dynamic-Creation...';
OnMouseMove := MagicMouseMove;//Assign our event
Visible := True;
end;
end;
-------
Regards,
Viktor Ivanov
------
public
//Declare a procedure for out Button's OnMouseMove()
procedure MagicMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
//implement the code used by the proedure
procedure TForm1.MagicMouseMove(Send
Y: Integer);
begin
if ssLeft in Shift then
begin
ReleaseCapture;
TControl(Sender).Perform(W
end;
end;
//form's OnCreate()
procedure TForm1.FormCreate(Sender: TObject);
var
Btn : TButton;
begin
Btn := TButton.Create(self);
with Btn do
begin
Parent := Self;
Left := 100;
Top := 100;
Width := 100;
Height := 30;
Caption := 'Dynamic-Creation...';
OnMouseMove := MagicMouseMove;//Assign our event
Visible := True;
end;
end;
-------
Regards,
Viktor Ivanov
ASKER
Thanks!
No prob :-)
Regards,
Viktor Ivanov
Regards,
Viktor Ivanov
ASKER
NameOfControl.Perform(WM_S