building a control -- Well trying anyway

Mark Schonewille m.schonewille at
Sat Nov 16 06:07:31 EST 2013

Hi Nakia,

Set the lockLoc of the group to true. This makes sure that any rects set 
by script will stick.

When you change the rect of the group, the controls inside the group 
won't resize automatically. You need a script to do this. You can add a 
resizeControl handler to the group and change all controls' sizes in 
response to that.

The border of the group may be invisible, making you to think that the 
rect doesn't change while in fact it does change.

You write "this action does not complete". Do you get an error? What is 
the exact text of the error?

Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces.

Buy my new book "Programming LiveCode for the Real Beginner"

Fill out this survey please

On 11/16/2013 11:21, Nakia Brewer wrote:
> Hi,
> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
> (the one that has the 'Done' 'Last' buttons on it etc)
> So, I have mocked up a group of objects in LC to simulate the look of the Native object (roughly close) and now I am trying to get it all to work.
> My current plan is to use this as a 'library' so I have it loaded as a substack of my test app. I want to be able to call it optionally depending on the field that bought the keyboard up.
> Now, so far I have got to the point of being able to copy the group from library stack to the current card of the current stack but have hit a stumble trying to perform any actions on the newly copied group. For example, I am trying to set the rect of the new group post creation and for the life of me cant get it to work.. Can anyone see something stupid below?
> In the stackscript of the library I am currently doing the below.
> on showUIKeyboardToolbar
>     ## First calculate the correct size for the UIKeyboardToolbar from the effective screen rect
>     -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>     put the working screenRect into tRect
>     set the itemdel to comma
>     put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>     put (item 4 of tRect - tHeight) into item 2 of tRect
>     copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>     put it into tNewGroup
>     set the rect of group tNewGroup of the current card of the current stack to tRect -- This action does not complete and the copied group does not resize ???
>     show group tNewGroup of the current card of the current stack
> end showUIKeyboardToolbar
> on keyboardDeactivated
>     ## Destroy the copied group -- This works fine, when the keyboard closes the group is destroyed
>     delete group "UIKeyboardToolbar" of the current card of the current stack
> end keyboardDeactivated
> In the application stack on the landing UI Card I have
> on openCard
>     start using stack "LC_iOS_UIKeyboardToolbar"
>     iphoneUseDeviceResolution true
> end openCard
> on keyboardActivated
>     showUIKeyboardToolbar
> end keyboardActivated
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list