[DUG] Adding button to form - FINALE ?

Colin/Mina colmin at ihug.co.nz
Wed Oct 15 12:19:46 NZDT 2008


Thanks Wayne (et al) ,

  It wasn't a parenting issue.

  It turns out that since I had copied the original project to a new folder 
I was actually modifying the code and adding components in the new folder 
but still compiling and running that in the original one because that was 
where the Project file pointed to.

  It suddenly dawned on me, so to check I put some trash in the code and it 
still compiled and ran (still without the new button showing).

  So I backed up the original code (to be sure, to be sure) then in the new 
folder removed each unit from the project then added them all in again from 
the new folder, then compiled and saved the project back into the new 
folder.

  This time when I nobbled the code it didn't compile and found the error. 
Then I fixed it and recompiled. 'Voila' the new button appeared in the Panel 
with the original.

 A trap for very old players!

   Thanks all for the assistance.


----- Original Message ----- 
From: "Wayne Roser" <rr at kristin.school.nz>
To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
Cc: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
Sent: Wednesday, October 15, 2008 7:43 AM
Subject: Re: [DUG] Adding button to form


> Hi Colin
> Outside chance but I seem to recall placing a button on a form and seeing 
> it at design time but not
> at runtime because of some parenting issue. At design time, it looked like 
> it was on Panel1, say,
> but I found that it was really on the form canvas and was in the 
> background at runtime. Anyway, it
> is pretty easy to test this. Pick a button that works and add something 
> like this to it's code:
> Caption := Button999.Parent.Name;
> Where Button999 should be replaced with the name of the button that is 
> disappearing. You might have
> somewhere better to display the text than caption; chuck it in a 
> showmessage if you are using the
> Messages unit already.
> Wayne
>
> NZ Borland Developers Group - Delphi List <delphi at delphi.org.nz> on 
> Tuesday, 14 October 2008 at
> 4:36 p.m. +1300 wrote:
>>Thanks
>>
>> 1.  The button is placed on the Panel at design time and shows in the
>>Object Inspector. It doesn't show up anywhere on the form when I Build and
>>Run the application.
>>
>>2.  Directly copying and pasting an existing button, that does show, then
>>renaming it doesn't make it visible when I run the app.
>>
>>3.  Tag value of new button is same as all others = 0.
>>
>>4.  renaming Original Button and givig the added button its name, doesn't
>>fix the problem.
>>
>>5. STOP PRESS.
>>    No, I'm mot using form inheritance but I think Stacey is on to it. I 
>> was
>>looking at that possibility when I was interrupted and came back to find 
>>his
>>email. I think I'm somehow not working on the same project but still on 
>>its
>>its ancestor, having taken a copy to work on.
>>
>>  From memory I've been caught like this before.
>>
>>Will confirm tomorrow.
>>
>>  Cheers
>>
>>     Colin
>>
>>
>>----- Original Message ----- 
>>From: "Robert martin" <rob at chreos.co.nz>
>>To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
>>Sent: Tuesday, October 14, 2008 3:50 PM
>>Subject: Re: [DUG] Adding button to form
>>
>>
>>> Hi
>>>
>>> Try copying a button on the panel that does show, does it show?  (there
>>> might be code hiding components based on something obscure - like tag
>>> value)?
>>>
>>> What about changing the name of the new button to that of the old
>>> (rename old) does it work now.  Must be code changing it.
>>>
>>>
>>>
>>> Colin/Mina wrote:
>>>> Hi,
>>>>
>>>>   I'm modifying an old application that was written in D5. I have a
>>>> form amongst others on which there is a Panel on which there is a
>>>> TButton. All works fine. I need to add another button on the same
>>>> Panel but having done so it doesn't show up at Run Time. It is enabled
>>>> and its 'Visible' property = TRUE.
>>>>
>>>>   In fact I can't seem to add anything i.e.: labels, edit boxes etc..
>>>>
>>>>   The mind boggles at having to unravel a whole form and then start
>>>> from scratch adding 90 odd components and re-stitching it all together.
>>>>
>>>>   Any suggestions?
>>>>
>>>>   Thanks
>>>>
>>>>      Colin
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> NZ Borland Developers Group - Delphi mailing list
>>>> Post: delphi at delphi.org.nz
>>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with 
>>>> Subject:
>>>> unsubscribe
>>> _______________________________________________
>>> NZ Borland Developers Group - Delphi mailing list
>>> Post: delphi at delphi.org.nz
>>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
>>> unsubscribe
>>
>>_______________________________________________
>>NZ Borland Developers Group - Delphi mailing list
>>Post: delphi at delphi.org.nz
>>Admin: http://delphi.org.nz/mailman/listinfo/delphi
>>Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: 
>>unsubscribe
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: 
> unsubscribe 



More information about the Delphi mailing list