?
Solved

Allow User To Design At Runtime...

Posted on 1998-09-11
6
Medium Priority
?
135 Views
Last Modified: 2010-04-03
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...
0
Comment
Question by:MichaelB2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 200 total points
ID: 1339482
To move a control use

NameOfControl.Perform(WM_SYSCOMMAND, $f012, 0);

To create at run time use this......

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...';
      Visible := True;
    end;
end;

Regards,
Viktor Ivanov
0
 

Author Comment

by:MichaelB2
ID: 1339483
This May Be A Dumb Question, But Where Do I Put The:

NameOfControl.Perform(WM_SYSCOMMAND, $f012, 0);
0
 

Author Comment

by:MichaelB2
ID: 1339484
This May Be A Dumb Question, But Where Do I Put The:

NameOfControl.Perform(WM_SYSCOMMAND, $f012, 0);
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 10

Expert Comment

by:viktornet
ID: 1339485
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(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
begin
  if ssLeft in Shift then
  begin
    ReleaseCapture;
    TControl(Sender).Perform(WM_SYSCOMMAND, $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
0
 

Author Comment

by:MichaelB2
ID: 1339486
Thanks!
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339487
No prob :-)

Regards,
Viktor Ivanov
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question