<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE></TITLE>

<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2>While we're on the subject - I've just had a request to 
allow the user to modify the tab positions on a pagecontrol at 
runtime.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2>Any easy way to do this or would I need to search for a 
replacement component?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2>Project is d5 but soon to be d2007.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2>thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=089242202-28082007><FONT face=Verdana 
color=#800000 size=2>Steve</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #800000 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Rohit Gupta [mailto:rohit@cfl.co.nz] 
  <BR><B>Sent:</B> Tuesday, 28 August 2007 12:10 p.m.<BR><B>To:</B> NZ Borland 
  Developers Group - Delphi List<BR><B>Subject:</B> Re: [DUG] TPageControl 
  Interesting Observation D2007<BR></FONT><BR></DIV>
  <DIV></DIV>Hi Steve,<BR><BR>I came across that earlier.&nbsp; There are many 
  other stupidities in it.&nbsp; If I had realised they were there, I would not 
  have switched all my notebooks from orpheus to tpagectrl.<BR><BR>The last 
  frustrating one was if a tabsheet is visible and you set its Visible property 
  to true, the focus switches to it.&nbsp; We have a situation where in insert 
  mode certain tabs are made invisble.&nbsp; When the user finishes, they are 
  made visible again.. but the blasted focus changes.&nbsp; <BR><BR>A major 
  failing is that it has no way of telling you which page it is going to switch 
  to in the Change event.&nbsp; I had to add another&nbsp; event in that does 
  support it.<BR><BR>There are more gotchas.... when you are making the tabs 
  invisible.&nbsp;&nbsp; Pages property has physical pages, the Tabs property 
  has the visible pages...&nbsp;&nbsp; Wait for it... Tabs [2] is not the same 
  as Pages [2] if there are some invisible pages.&nbsp; So if there are pages 1 
  2 and 3 and all are visible then index 2 gets the middle page.&nbsp; If you 
  now make the middle page/tab invisible, index 2 fetches the last page.&nbsp; 
  Great fun for coding when I was writing the OnDrawTab.<BR><BR>Steve Peacocke 
  wrote: 
  <BLOCKQUOTE 
  cite=mid:f1657d310708271646v26b69da1rbb28c36743e938c@mail.gmail.com 
  type="cite"><PRE wrap="">Searching the newsgroups and web came up with a blank on this one so I
thought I'd throw it to you people to see if any of you are having
this problem as well.

I have a TPageControl with 8 separate tabs. Three of those tabs are
made invisible on startup, to be made visible on certain conditions.

I have noted that if I compile the application with the main
(starting) tab selected, then the tab will be blank - i.e. nothing
will appear on the tab. It's like everything isset to invisible,
except that items on that tab are never invisible. When I click on
another tab and click back to the main tab, then everything appears as
it should.

However, when I compile the application with another tab selected,
then on starting, I simply change to the main tab (in code, e.g. :
pcCfg.ActivePage := tsMain), then all is displayed as it should.

Puzzling. Is this a bug? can anyone else duplicate that?

The interesting thing about it is that it ocurs in 2 of the
applications that I look after, and it has only just started occuring
recently (may be after update #2).

Steve

  </PRE></BLOCKQUOTE><BR>
  <DIV class=moz-signature>-- <BR>
  <META content="MSHTML 6.00.2900.2802" name=GENERATOR>
  <DIV align=left>
  <DIV align=left><STRONG><FONT size=2><FONT face=Verdana color=#666666>Rohit 
  Gupta</FONT></FONT></STRONG></DIV>
  <DIV align=left><STRONG><FONT size=2><FONT face=Verdana 
  color=#666666>B.E.&nbsp;Elec.&nbsp;&nbsp;&nbsp;M.E.&nbsp;&nbsp;&nbsp;Mem&nbsp;IEEE&nbsp;&nbsp;&nbsp; 
  Associate&nbsp;IEE</FONT></FONT></STRONG></DIV>
  <DIV align=left><STRONG><FONT size=2><FONT face=Verdana 
  color=#666666>Technical&nbsp;Manager</FONT></FONT></STRONG></DIV>
  <DIV align=left><STRONG><FONT face=Verdana color=#666666 size=2>Computer 
  Fanatics Limited</FONT></STRONG></DIV>
  <DIV align=left><STRONG></STRONG>&nbsp;</DIV>
  <DIV align=left><FONT face=Verdana color=#666666 
  size=2><STRONG>Tel</STRONG>&nbsp;&nbsp;&nbsp;&nbsp; +64 9 4892280</FONT></DIV>
  <DIV align=left><FONT face=Verdana color=#666666 
  size=2><STRONG>Fax</STRONG>&nbsp;&nbsp;&nbsp; +64 9 4892290</FONT></DIV>
  <DIV align=left><FONT color=#666666><FONT face=Verdana 
  size=2><STRONG>Email&nbsp; </STRONG></FONT><A 
  href="mailto:rohit@cfl.co.nz"><FONT face=Verdana color=#0080ff 
  size=2>rohit@cfl.co.nz</FONT></A></FONT><FONT color=#666666><FONT face=Verdana 
  size=2><STRONG></STRONG></FONT></FONT></DIV>
  <DIV align=left><FONT color=#666666><FONT face=Verdana 
  size=2><STRONG>Web&nbsp;&nbsp; &nbsp;</STRONG></FONT><A 
  href="http://www.cfl.co.nz/"><FONT face=Verdana color=#0080ff 
  size=2>www.cfl.co.nz</FONT></A></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>
  <HR>
  </DIV>
  <DIV align=left><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: rgb(153,153,153); FONT-FAMILY: Verdana"><FONT 
  size=1><SPAN lang=EN-NZ 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><FONT color=#000000><FONT 
  face=Verdana color=#808080 size=1>This email and any attachments contain 
  information, which is confidential and may be subject to legal privilege and 
  copyright. If you are not the intended recipient, you must not use, distribute 
  or copy this email or attachments. If you have received this in error, please 
  notify us immediately by return email and then delete this email and any 
  attachments.</FONT> 
  <O:P></O:P></FONT></SPAN></FONT></SPAN></DIV></DIV></DIV><BR>
  <P><FONT size=2>No virus found in this incoming message.<BR>Checked by AVG 
  Free Edition.<BR>Version: 7.5.484 / Virus Database: 269.12.9/975 - Release 
  Date: 26/08/2007 9:34 p.m.<BR></FONT></P>
  <P><FONT face=Arial size=2></FONT></P></BLOCKQUOTE></BODY></HTML>