Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to save different forms and use it in the runtime?

  1. #1

    How to save different forms and use it in the runtime?

    How can i save different forms or panels inside the forms and call in run time?

    My project need wants to many different forms and components.
    I want to have three panels.
    In one of this panels i want to load the componets and place it in the giving position and size.

    Something like this .

    When i click the "settings" button from panel2 in the panel 3 appears the 15 components in their position and size.
    When i click the "screen" button from panel2 in the panel 3 disappears the previous components and appears the new 12 components..

    Thank you...

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I assume that you are talking about either Delphi or Lazarus' components?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3
    Quote Originally Posted by WILL View Post
    I assume that you are talking about either Delphi or Lazarus' components?
    Delphi for start and Lazarus second

  4. #4

  5. #5
    Quote Originally Posted by Brainer View Post
    Hi!
    Have you checked this one out already?
    http://www.delphi3000.com/articles/article_2969.asp?SK=
    Ouaou i never Know that is so compicated?
    Thanks brainer

    Do have something else to propose me ... ?
    One panel different choises and different components from choises ?

    Thank you...

  6. #6
    If I understood your first post well, you are trying to make some kind of the Ribbon control, am I right? Well, maybe I didn't say precisely what I mean, but basically: you want to change components depending on what options the user selects. Yea - that sounds more like your question. Anyway, have you looked into frames? Here's a link to a video explaining how to use them in Delphi: http://www.youtube.com/watch?v=pWK-SYpYn4Y. The audio is in Italian, I guess, but there's nothing to understand from what the guy's talking. Just watch the video.

    Alternatively, you can build your app using TTabControl and hide the tabs - I believe there's a property of the TTabControl component to do so.

  7. #7
    Quote Originally Posted by Brainer View Post
    If I understood your first post well, you are trying to make some kind of the Ribbon control, am I right? Well, maybe I didn't say precisely what I mean, but basically: you want to change components depending on what options the user selects. Yea - that sounds more like your question. Anyway, have you looked into frames? Here's a link to a video explaining how to use them in Delphi: http://www.youtube.com/watch?v=pWK-SYpYn4Y. The audio is in Italian, I guess, but there's nothing to understand from what the guy's talking. Just watch the video.

    Alternatively, you can build your app using TTabControl and hide the tabs - I believe there's a property of the TTabControl component to do so.
    Frames ha ... this is very close to that i am thinking for.

    Thanks again brainer...

  8. #8
    As far as creating components go, you can simply:
    Code:
    with TPanel.create(form1) do begin
      left:=10;
      top:=10;
      width:=200;
      height:=100;
      caption:='';
    end;
    and so on...

  9. #9
    Quote Originally Posted by azrael11 View Post
    Frames ha ... this is very close to that i am thinking for.
    Hm, then please elaborate more.

  10. #10
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    You could also create your own code to manipulate a set of basic VCL/LCL components to be resized based on the size of the form or panel they reside in. Then it's all in the math you use and applying new size values to width and height of each of the components in your structure you built inside.

    If none of this is helping perhaps you can instead upload a basic drawing or diagram which helps to explain visually what it is that you are trying to do.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •