View Issue Details

IDProjectCategoryView StatusLast Update
0025555LazarusFCLpublic2014-03-18 22:44
Reporterraypro Assigned ToMartin Friebe  
Status resolvedResolutionfixed 
Product Version1.2.0RC2 
Target Version1.2.2Fixed in Version1.3 (SVN) 
Summary0025555: PageControl default page does not paint
DescriptionWhen selecting a tabsheet in PageControl by visual form designer (say: has 3 tabs, the second is selected in form designer), this configuration is not seen after compilation: always the first tabsheet is selected with no content drawn in it. As a workaround, you have to switch manually to another tab and then back.

In contrast to that: in Laz 1.0.14 all works properly.

Thanks and greetings
TagsNo tags attached.
Fixed in Revision44469
Attached Files


Mark Morgan Lloyd

2014-01-19 14:24

reporter   ~0072540

Looks similar to although that affected primarily some versions of GTK2.

Bart Broersma

2014-01-19 16:42

developer   ~0072546

I cannot reproduce with 1.2 fixes (Lazarus 1.2RC3 r43721 FPC 2.6.4RC1 i386-win32-win32/win64), nor with trunk (32-bit fpc, Win7-64).
It always displays the TabSheet I selected in OI with the appropriate controls on it.

Please attach a sample app demonstrating the problem.

Bart Broersma

2014-01-19 16:43

developer   ~0072547

Target 1.2, since it is reported as being a regression.


2014-01-22 09:04

reporter   ~0072596

Ahm... Sorry for that... The problem only occurs when GLScene Viewer control is placed into tabsheet. This is rather a problem of GLScene package than a general "bug". I'll go for myself to fix it.

Thanks for your effort.

Martin Friebe

2014-02-16 16:44

manager   ~0073094

Last edited: 2014-02-16 18:35

View 2 revisions

Please test the following, both in file

class procedure TWin32WSCustomTabControl.AddAllNBPages(const ATabControl: TCustomTabControl);

line 508 (2nd last line in procedure)
  SetPageIndex(ATabControl, ATabControl.PageIndex); // index may not have been updated while pages where hidden

Comment out that line.
recompile / test

2) (undo changes from above)

line 371
class procedure TWin32WSCustomTabControl.MovePage(const ATabControl: TCustomTabControl;
 const AChild: TCustomPage; const NewIndex: integer);

replace the entire procedure body (about 35 lines), with the following

  RemovePage(ATabControl, AChild.PageIndex);

recompile / test

Luiz Americo

2014-02-25 02:58

developer   ~0073267

What version of glscene are you using?

Tried to compile 1.2 from sf without luck


2014-03-18 09:02

reporter   ~0073805

Last edited: 2014-03-18 09:18

View 4 revisions

Just for information:
I have the same issue here. PageControl always starts with empty TabSheet0. Even if I select another one in designview. I have to switch forth and back and the content of the TabSheet0 will show up. If I change from empty TabSheet0 to TabSheet9 also TabSheet9 will be empty. All others always showing up. I dont use glscene.

Later note: I just see after opening the project, in designview, TabSheet9 is shown and selected in Object Inspector too, but PageControl shows tab for TabSheet0.

Martin Friebe

2014-03-18 13:07

manager   ~0073816

@Carsten: Your OS/Widgetset?
Do you have an example project you can attach or sent, which triggers the issue?

Are there any other none LCL components on the form/pagecontrol/sheets?

There is a similar issue on our forum:,23914.0.html
Yet this may be caused by an exception in another component.


2014-03-18 15:55

reporter   ~0073818

Hi Martin, I run Win7 32bit with Lazarus v1.2.0 and FPC 2.6.2

Of course, there are many other non LCL components in the form (mainly pl_xxx) but not on TabSheet0 and TabSheet9.

I will try to find all necessary files to get my project compiled on another machine. How I shall put it here as Zip?

Martin Friebe

2014-03-18 16:23

manager   ~0073819

zip is ok.

you can send it in private if you prefer.
Correct the spelling before using:


2014-03-18 19:38

reporter   ~0073825

Last edited: 2014-03-18 19:44

View 2 revisions

sent to the lazarus address ... :-)

Ähm do I need to send the components too?

Martin Friebe

2014-03-18 22:44

manager   ~0073828

fixed in revision 44469.

If a control created its handle during loading, then TCustomTabControl.DoSendPageIndex would not send the active page to the widgetset.

Issue History

Date Modified Username Field Change
2014-01-19 11:47 raypro New Issue
2014-01-19 14:24 Mark Morgan Lloyd Note Added: 0072540
2014-01-19 16:42 Bart Broersma Note Added: 0072546
2014-01-19 16:43 Bart Broersma LazTarget => -
2014-01-19 16:43 Bart Broersma Status new => feedback
2014-01-19 16:43 Bart Broersma LazTarget - => 1.2
2014-01-19 16:43 Bart Broersma Note Added: 0072547
2014-01-19 16:43 Bart Broersma Target Version => 1.2.0
2014-01-22 09:04 raypro Note Added: 0072596
2014-01-22 09:04 raypro Status feedback => new
2014-02-16 16:44 Martin Friebe Note Added: 0073094
2014-02-16 16:44 Martin Friebe Assigned To => Martin Friebe
2014-02-16 16:44 Martin Friebe Status new => feedback
2014-02-16 18:35 Martin Friebe Note Edited: 0073094 View Revisions
2014-02-25 02:58 Luiz Americo Note Added: 0073267
2014-02-28 20:38 Martin Friebe LazTarget 1.2 => 1.2.2
2014-02-28 20:38 Martin Friebe Target Version 1.2.0 => 1.2.2
2014-03-18 09:02 Carsten Note Added: 0073805
2014-03-18 09:07 Carsten Note Edited: 0073805 View Revisions
2014-03-18 09:08 Carsten Note Edited: 0073805 View Revisions
2014-03-18 09:18 Carsten Note Edited: 0073805 View Revisions
2014-03-18 13:07 Martin Friebe Note Added: 0073816
2014-03-18 15:55 Carsten Note Added: 0073818
2014-03-18 16:23 Martin Friebe Note Added: 0073819
2014-03-18 19:38 Carsten Note Added: 0073825
2014-03-18 19:44 Carsten Note Edited: 0073825 View Revisions
2014-03-18 22:44 Martin Friebe Fixed in Revision => 44469
2014-03-18 22:44 Martin Friebe Note Added: 0073828
2014-03-18 22:44 Martin Friebe Status feedback => resolved
2014-03-18 22:44 Martin Friebe Fixed in Version => 1.3 (SVN)
2014-03-18 22:44 Martin Friebe Resolution open => fixed