Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-03

Using TNotebook

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Damien Gerard

Hi !

In my application (Win32/Unicode/last snapshot/closed source), I use a TNotebook within another TNotebook and other many components (TTreeView/TSpeedButton/TCheckbox...). A structure like this :
- TNoteBook (7 pages)
- Components
- [...]
- TNotebook (8 Pages)
- Components
- [...]

All these components are created at design time (from the IDE). All images used by all components are provided by a TImageList (except for TSpeedButton) from another form.

At runtime controls of pages are not visible when they have to.

For example, I have some components of the first page visible (and fully working) but it is actually the second page which is selected. And only a part of all components are visible.
Screenshot : http://ftn.shikami.org/misc/Lazarus/notebook-wrongdisplay.jpg The same for all other notebooks.
The `ActivePageComponent` properties are modified by the event `OnSelectionChange` of two TTreeView. I have to select all visible pages, one by one, to have the expected behavior. Worse, after a few click on the treeview (around 15 or 20), all images disappear (except for TSpeedButton) and sometimes a bad one is printed for the selected item (in TTreeView or TMenu)
Before : http://ftn.shikami.org/misc/Lazarus/imagelist2.jpg After : http://ftn.shikami.org/misc/Lazarus/imagelist.jpg

I observed all work perfectly if I am not playing with the following properties :
TPage.visible and TPage.TabVisible

With these properties, I would like to hide some pages. May be it is not the good way to do this ?
Could someone explain me the difference between `TPage.Visible` and `TPage.TabVisible` ?

If it is real bug, I would like to reproduce this behavior.

Thanks !

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Damien Gerard
to Damien Gerard

Le Mar 26, 2008 ? 3:19 PM, Damien Gerard a ?crit :

Show quoted text 36 lines
Hi ! In my application (Win32/Unicode/last snapshot/closed source), I use a TNotebook within another TNotebook and other many components (TTreeView/TSpeedButton/TCheckbox...). A structure like this : - TNoteBook (7 pages) - Components - [...] - TNotebook (8 Pages) - Components - [...] All these components are created at design time (from the IDE). All images used by all components are provided by a TImageList (except for TSpeedButton) from another form. At runtime controls of pages are not visible when they have to. For example, I have some components of the first page visible (and fully working) but it is actually the second page which is selected. And only a part of all components are visible. Screenshot : http://ftn.shikami.org/misc/Lazarus/notebook-wrongdisplay.jpg The same for all other notebooks. The `ActivePageComponent` properties are modified by the event `OnSelectionChange` of two TTreeView. I have to select all visible pages, one by one, to have the expected behavior. Worse, after a few click on the treeview (around 15 or 20), all images disappear (except for TSpeedButton) and sometimes a bad one is printed for the selected item (in TTreeView or TMenu) Before : http://ftn.shikami.org/misc/Lazarus/imagelist2.jpg After : http://ftn.shikami.org/misc/Lazarus/imagelist.jpg I observed all work perfectly if I am not playing with the following properties : TPage.visible and TPage.TabVisible

TPage.Visible only actually

Show quoted text 11 lines
With these properties, I would like to hide some pages. May be it is not the good way to do this ? Could someone explain me the difference between `TPage.Visible` and `TPage.TabVisible` ? If it is real bug, I would like to reproduce this behavior. Thanks !
Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Howard Page-Clark
Damien Gerard wrote
Could someone explain me the difference between `TPage.Visible` and `TPage.TabVisible` ?

'Visible' controls the visibility of items within the client area of the page - whatever panels, labels etc you have put there. 'Tabvisible' controls whether the Tab is shown (and therefore whether you can click on it to move pages) or not. Pages without visible tabs are not immensely useful I would say. However, if you need them, you can have them without having to write code to hide the tabs yourself!

Howard

Reply by email

Damien Gerard
to Howard Page-Clark

Le Mar 26, 2008 ? 7:39 PM, Howard Page-Clark a ?crit :

Show quoted text 9 lines
Damien Gerard wrote: > Could someone explain me the difference between `TPage.Visible` and > `TPage.TabVisible` ? 'Visible' controls the visibility of items within the client area of the page - whatever panels, labels etc you have put there. 'Tabvisible' controls whether the Tab is shown (and therefore whether you can click on it to move pages) or not.

Thanks

Pages without visible tabs are not immensely useful I would say. However, if you need them, you can have them without having to write code to hide the tabs yourself!

They are not always hidden. It depends upon selection of my TTreeView

Actually, the issue remains even with TabVisible, but far away in time. It is really strange.
It All works well and at a certain time, it becomes funny :) I will continue to investigate to find bug in my own code, and if necessary a project sample to reproduce the bug (if any)

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Felipe Monteiro de Carvalho
to Damien Gerard

Just something extra. Use TPageControl instead to have a tabbed control. The fact that TNotebook has tabs is just an accident, and now needed for backwards compatibility. It actually shouldn't have.

Felipe Monteiro de Carvalho

Reply by email

Damien Gerard
to Felipe Monteiro de Carvalho

Le Mar 27, 2008 ? 3:10 PM, Felipe Monteiro de Carvalho a ?crit :

Just something extra. Use TPageControl instead to have a tabbed control. The fact that TNotebook has tabs is just an accident, and now needed for backwards compatibility. It actually shouldn't have.

Thanks I will try this before anything.

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email