Results 1 to 6 of 6

Thread: Reusing components on multiple TPageControl pages

  1. #1

    Reusing components on multiple TPageControl pages

    Would it be possible to reuse the same components on more than one page of a TPageControl somehow? (And no, a TTabControl is not what I'm looking for.)

    Mason

  2. #2
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Reusing components on multiple TPageControl pages

    When a page becomes active, change the control's parenty to point to the active tab.

    Not sure it will work, but thats the theory anyway.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  3. #3

    Reusing components on multiple TPageControl pages

    Ooo! That simple? I'll have to test it out. If that would work, it would really simplify things for me.

    On a related note, is it possible to treat separate pages of a TPageControl as individual forms, each with their own unit file? Because a TPageControl with a lot of tabs can require a whole lot of code and a massive form declaration, and I like to keep my units small if possible.

  4. #4
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Reusing components on multiple TPageControl pages

    If you made a component for each page inheriting from tpagecontrl then you could. Personally I think this is far too much work
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  5. #5

    Reusing components on multiple TPageControl pages

    Quote Originally Posted by masonwheeler
    On a related note, is it possible to treat separate pages of a TPageControl as individual forms, each with their own unit file? Because a TPageControl with a lot of tabs can require a whole lot of code and a massive form declaration, and I like to keep my units small if possible.
    Or put a frame on each page...
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  6. #6

    Reusing components on multiple TPageControl pages

    A TFrame turned out to be exactly what I was looking for. Thanks, Andreas! I knew there was a way to do it--I've played around with DeDe enough to know that certain programs were using this trick--but I didn't know how they did it.

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
  •