Board index » cppbuilder » Moving objects from Form onto TPageControl

Moving objects from Form onto TPageControl

How can I move components (labels, checkboxes, etc) onto TPageControls,
so that they are only visible on one of the pages and not all of them?
Moving them from my form onto a page makes them visible on all the pages
(when I change page by clicking on a tab), but I want them only visible
on one page.

Thanks,

Gab

 

Re:Moving objects from Form onto TPageControl


Highlight the components, then press Ctrl-C to copy them to the clipboard.
Then while they're still highlighted, press the Del key to delete them from
the form completely.  Next, click on the PageControl and bring up the
desired TabSheet.  Then click on the desired TabSheet *itself* so it's
highlighted, NOT the PageControl or the Form.  Then press Ctrl-V to paste
the copied components.

The purpose of all of this - to re-Parent the components.  They were showing
up regardless of the current TabSheet shown because they were not children
of any particular TabSheet.  Whenever you place a new component onto a form,
the currently highlighted component becomes the Parent for it, so you have
to make sure you have the proper component highlighted when you place new
components.

Gambit

Quote
"Gab" <G...@athas.org> wrote in message news:3BB3F9AC.9040709@athas.org...
> How can I move components (labels, checkboxes, etc) onto TPageControls,
> so that they are only visible on one of the pages and not all of them?
> Moving them from my form onto a page makes them visible on all the pages
> (when I change page by clicking on a tab), but I want them only visible
> on one page.

Re:Moving objects from Form onto TPageControl


Quote
Remy Lebeau wrote:
> Highlight the components, then press Ctrl-C to copy them to the clipboard.
> Then while they're still highlighted, press the Del key to delete them from
> the form completely.  Next, click on the PageControl and bring up the
> desired TabSheet.  Then click on the desired TabSheet *itself* so it's
> highlighted, NOT the PageControl or the Form.  Then press Ctrl-V to paste
> the copied components.

> The purpose of all of this - to re-Parent the components.  They were showing
> up regardless of the current TabSheet shown because they were not children
> of any particular TabSheet.  Whenever you place a new component onto a form,
> the currently highlighted component becomes the Parent for it, so you have
> to make sure you have the proper component highlighted when you place new
> components.

Thanks. I was worried about losing all the code if I cut and pasted.

Gab

Other Threads