[lazarus] Problem adding a tab when TNotebook is visible

Marc Weustink weus at quicknet.nl
Fri Feb 25 19:52:12 EST 2000


At 01:01 26-02-2000 +0100, I wrote:

>Ok I tracked down the problem. It has to do with the way pages are added. 
>After a page has been added (in delphi) it receives focus. We do the same, 
>only the page isn't added yet ;-).
>As a temp solution I removed (and committed) this, and I'm looking for a 
>way to handle the focus.

This looked like the problem, but the real problem is larger, some parts of 
the notebook need to be recoded.
In GTK to get a user caption on a page, you need a label.  This label is 
created by way of a TLabel. The GTK part of this label is later on used as 
the page label.
This aproach has two nasty side effects:
1) It is platform dependent. In a non GTK environment you'll end up with an 
extra label
2) Since it was a LCL control it has still all events and such attached to 
it. This resulted in our crash when the control is visible (events are 
attached when a control is visible, since on a invisible notebook control 
the label was used before it went visible, the events were never attached)

Point 2 you might overcome by first detaching the signals, point 1 still 
remains. When I find some time tomorrow I'll fix it.

Marc







More information about the Lazarus mailing list