TSpeedButton - This thing really sucks!!!

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

TSpeedButton - This thing really sucks!!!

Postby FrancoisSoft » Wed Jul 28, 2004 3:35 pm

Recently I have been writing a development environment much like C++ Builder for batch files which I call batch builder. The program is very near completion and it seems that a lot of people are going to use it from what I hear from people. Personally I like the program but that's not why I started this thread. I'm sort of in Limbo with this program because I created an array of TSpeedButtons (about 100) and had a script allocate memory for a given number of them, which it did, and the program even terminated correctly with the delete specifier but when I start the program no button appears. I did attach them to a TTabSheet object which belongs to a TPageControl object. When that didn't work I tried attaching them to the form and nothing happened. Maybe a little code will explain my dilemma.

Code: Select all

TSpeedButton *Items[50];
TTabSheet *Tablet; // This is created at design time.
int NumberOfItems = 6;

for (int x=0;x<NumberOfItems;x++) {

    Items[x] = new TSpeedButton(Tablet);
    Items[x]->Flat = true;
    Items[x]->Width = 25;
    Items[x]->Height = 25;


I really need help on this one because I might never be able to finish Batch Builder. Any help would be appreciated!

P.S. By the way, if you want to learn more about Batch Builder please visit my website. http://www.geocities.com/francoissoft

:twisted: This TSpeedButton really sucks.

Re: TSpeedButton - This thing really sucks!!!

Postby Damon » Thu Jul 29, 2004 3:21 pm

You need to set the Parent property of each TSpeedButton. (The Parent specifies the TWinControl descendant on which a child control will be displayed.)

Code: Select all

    Items[x] = new TSpeedButton(Tablet);
    Items[x]->Parent = Tablet; // or some other TWinControl descendant
    // (Also, ensure that Tablet is a valid, initialized pointer.)
    // other stuff...

Best of luck,
User avatar
BCBJ Editor and Admin
BCBJ Editor and Admin
Posts: 285
Joined: Wed May 26, 2004 11:25 pm
Location: Stillwater, OK, USA

Return to Technical

Who is online

Users browsing this forum: No registered users and 14 guests