Dynamically Creating Buttons

Peter Haworth pete at lcsql.com
Tue May 28 13:48:12 EDT 2013


Hi Graham,
Your best friend may be the templateButton.  You can set the properties of
it before issuing the create button command so it looks exactly what you
want.  To set the position you want, I'd use the topLeft property and the
name or label property for the text to appear in the button.  Only thing to
remember is to reset the templateButton before and after each button is
created.

Pete
lcSQL Software <http://www.lcsql.com>


On Tue, May 28, 2013 at 10:35 AM, Graham Pearson <gspearson at gmail.com>wrote:

> I have been searching this mailing list and the forums at runrev for an
> answer before I post.
>
>
>
>
>
> Without having any objects on a card, does anyone have notes on how to
> create a button and position it to the coordinates of 5,5
>
> In my application, I am to the point now to taking each record from a
> database and creating a button for the user to select. The information
> from this loop will contain the text for the button and will allow for 5
> pixels of spacing between buttons.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list