LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I want to create a new label object by code, not drag and drop from tools. Could I decide position, text color, content and name of this label? I tried to search, but I can't find any document about this, so I have to bother you guys again .
As Craig mentioned look at the 'create' command... also have a look at the 'templateField' keyword in the dictionary... The script below will create a 'label' field for you... say from within the script of a button, but there again... it could be from anywhere
on mouseUp
set the text of the templateField to "label:"
set the width of the templateField to 100
set the height of the templateField to 21
set the visible of the templateField to true
set the dontwrap of the templateField to true
set the locktext of the templateField to true
set the threeD of the templateField to true
set the showfocusborder of the templateField to false
set the showborder of the templateField to false
set the traversalOn of the templateField to false
set the textAlign of the templateField to right
set the loc of the templateField to the loc of this card
create field "boo"
end mouseUp
I'm sorry to ask you again. How could I delete all fields of a card by code? I tried 'select' and 'delete' keyword, but I only could delete one field / a time. Is there any keyword to select and delete all fields of a card?