PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Peter Malcolm on May 17, 2012, 03:58:50 PM

Title: Create Controls at Runtime
Post by: Peter Malcolm on May 17, 2012, 03:58:50 PM
Can we create controls at runtime with Firefly?    Basically I need to create a number of bitmap and button controls at runtime, as I don't know how many will be required at compile time.   I could just create PowerBasic controls, but then I would be restricted to those controls PowerBasic supplies (eg can't show animated GIFs, nice themed controls etc).

It would be fine to create the first member of a control array at design time, and then add more.

Is this possible?

Thanks!   
Title: Re: Create Controls at Runtime
Post by: Robert Eaton on May 17, 2012, 11:59:45 PM
There isn't a feature like in VB.

http://www.planetsquires.com/protect/forum/index.php?topic=1464.msg12137#msg12137 (http://www.planetsquires.com/protect/forum/index.php?topic=1464.msg12137#msg12137)
or
http://www.planetsquires.com/protect/forum/index.php?topic=2233.msg17548#msg17548 (http://www.planetsquires.com/protect/forum/index.php?topic=2233.msg17548#msg17548)

Title: Re: Create Controls at Runtime
Post by: James Padgett on May 18, 2012, 07:36:20 AM
Create a bunch of controls and hide what you don't need.  Show as necessary ?
Title: Re: Create Controls at Runtime
Post by: José Roca on May 18, 2012, 11:29:15 AM
Of course they can be created, either using CreateWindowEx or the methods of the CWindow class. But you have to do all the work by yourself.