Re: Confused the use of Buttons.pas same name but not from VCL

Posted by Jenny, DelphiLand Team on June 18, 20011

In Reply to Confused the use of Buttons.pas same name but not from VCL posted by Sai Win Aung Win on June 17, 20011

If you still have the original Buttons.pas and the "special" Buttons.pas, you could try the following:

1. Restore the original Buttons.pas file in the VCL.
2. Rename the "special" Buttons.pas, for example: ButtonsX.pas
3. Move ButtonsX.pas to the same directory where the original Buttons.pas is located.
4. In the code of ButtonsX.pas, rename TSpeedButton to TSpeedButtonX.
5. Register TSpeedButtonX so that it shows up in Delphi's component bar (for example in a section that you call "Extra").
6. Create a test-project that includes both TSpeedButton as well as TSpeedButtonX. If all went well, you don't have to manually declare ButtonsX.pas in any USES declaration.
7. In case of errors, maybe more changes in the code of ButtonsX.pas are needed.

Good luck, and tell us if it worked!
Jenny

Related articles

       

Follow Ups