Recent

Author Topic: pageControl tabs won't show at runtime  (Read 5239 times)

polpero

  • Full Member
  • ***
  • Posts: 121
pageControl tabs won't show at runtime
« on: December 19, 2014, 10:37:43 pm »
Hi...

Am I the only one using a PControl that don't show it's tabs at runtime?

This happens mostly when using tabPosition := tpBottom

Found that by calling the tabPosition on formCreate solves the issue
but... it didn't perform that way before and... it doesn't feel right...

I'm on windows 8 with Laz 1.2.6

thanks!

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: pageControl tabs won't show at runtime
« Reply #1 on: December 22, 2014, 01:23:01 pm »
Works well here on all platforms. Do you have set TabVisible to false?
Lazarus 1.7 (SVN) FPC 3.0.0

polpero

  • Full Member
  • ***
  • Posts: 121
Re: pageControl tabs won't show at runtime
« Reply #2 on: December 24, 2014, 02:16:28 pm »
yes of course

I've got this pageControl designed with 2 tabs
then on run time only the first one shows.

Both are visible only if I later issue a position change such as
calling tabPosition := tpTop on a  tpBottom designed
or tpBottom on a tpTop designed.

Calling tpTop on  tpTop designed does nothing. (only the first is visible)

very strange

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: pageControl tabs won't show at runtime
« Reply #3 on: December 24, 2014, 06:50:58 pm »
Please post a little project which shows the issue (pack .pas, .lfm, .lpr and .lpi files into a .zip which you can upload here).

polpero

  • Full Member
  • ***
  • Posts: 121
Re: pageControl tabs won't show at runtime
« Reply #4 on: December 24, 2014, 09:15:11 pm »
Can't reproduce...

A Form with a unique PageControl performs adequately

I prob have an offending command somewhere else...
which is why was asking if anyone else had seen such a behavior...

could help finding the culprit :)

polpero

  • Full Member
  • ***
  • Posts: 121
Re: pageControl tabs won't show at runtime
« Reply #5 on: December 27, 2014, 05:45:01 pm »
Found something...

Try to reproduce this test:

Deposit on a PageControl with 4 tabs on a form

run and compile

Everything should be ok

Now add a lzRichEdit on tab two
run and compile...

what I get at this point is only tabs one and two showing

Try: cut and paste that lzRichEdit on tab one
run and ...
I get only tab one visible

Is anyone able to replicate this test?
 

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: pageControl tabs won't show at runtime
« Reply #6 on: December 27, 2014, 07:39:16 pm »
I tried with TRichMemo (I don't have lzRichEdit here) and the pagecontrol behaves fine, at least on Win7. If you are sure that the issue is related to lzRichEdit you should repost with "lzRichEdit" in the title to attract the attention of the author. Or contact him directly by PM.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: pageControl tabs won't show at runtime
« Reply #7 on: December 28, 2014, 05:40:58 pm »
Now I installed lzRichEdit and can confirm your issue with the missing pages. A quick test shows, however, shows that the problem seems to disappear if the RichEdit is created at runtime:

Code: [Select]
procedure TForm1.FormCreate(Sender: TObject);
begin
  lzRichEdit := TlzRichEdit.Create(self);
  lzRichEdit.Parent := TabSheet2;  // 2nd page of the page control as in your example
  lzRichEdit.Align := alClient;
  // etc. - set other properties
end;

polpero

  • Full Member
  • ***
  • Posts: 121
Re: pageControl tabs won't show at runtime
« Reply #8 on: December 28, 2014, 08:38:04 pm »
Thank you for testing

Issuing a tabPosition change at runtime  also replaces the tabs in the pageControl...


I have eMailed to author this morning

 

TinyPortal © 2005-2018