Button in/on Rectangle.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
kenift
Posts: 7
Joined: Thu Apr 26, 2012 6:35 pm

Button in/on Rectangle.

Post by kenift » Thu Apr 26, 2012 6:50 pm

I've started with LiveCode a couple of times and get stuck trying to do the simplest things.
I'm a long-term Delphi/VB/Pascal/Gambas (plus various robot and motion control and embedded) developer and can normally get new languages working out of the box. Please help me to get something functioning so I can justify buying the IDE.

1) My target platform is iPad, so I created a 1024 x 748 rectangle to define the window size, but cannot put a button in it.
Where am I going wrong?

2) When I put a rectangle over a rectangle, it will not fill with color.
(It does not help that the two columns between Fill and Clear are unlabeled and Psychic Hotline are busy.)

Thanks.

Klaus
Posts: 14196
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Button in/on Rectangle.

Post by Klaus » Thu Apr 26, 2012 7:00 pm

HI kenift,

I highly recommend to check these stacks:
http://www.runrev.com/developers/lesson ... nferences/

To be honest, I have not the slightest idea what your problem is!?
Button into "rectangle"? Rectangle over rectangle?
Sorry, no capisce...


Best

Klaus

kenift
Posts: 7
Joined: Thu Apr 26, 2012 6:35 pm

Re: Button in/on Rectangle.

Post by kenift » Thu Apr 26, 2012 7:01 pm

I draw a rectangle, and then expect to be able to draw a button on top of the rectangle, but it will not allow.

kenift
Posts: 7
Joined: Thu Apr 26, 2012 6:35 pm

Re: Button in/on Rectangle.

Post by kenift » Thu Apr 26, 2012 7:03 pm

I can draw a button on a blank window (stack?) but then do not know how to define size of window.

kenift
Posts: 7
Joined: Thu Apr 26, 2012 6:35 pm

Re: Button in/on Rectangle.

Post by kenift » Thu Apr 26, 2012 7:18 pm

OK, it's nothing to do with my background rectangle, it will not draw a button on a new blank stack.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7392
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Button in/on Rectangle.

Post by jacque » Thu Apr 26, 2012 7:28 pm

Welcome. The size of the stack determines the card size. You won't need a rectangle object at all. If the stack size isn't correct when run on a mobile device, it will be resized to fit automatically. The advantage of setting the stack size during development is that you can see how the placement of your controls will look.

Except for the graphic object tools, you don't drag out object rectangles. You simply drag (or double-click) the object in the tool palette. Dragging a control to the card will place it wherever you let go. Double-clicking a control in the tool palette will place it in the center of the card, and you can move it from there. Once placed, any object can be resized by dragging the selection handles while in edit mode.

Edited to add:
The color column on the left is for patterns. The column on the right is for colors. Click on either and it will become obvious; the color square opens the color picker, the pattern square opens the pattern picker.

Most of all this is in the user guide, which I think would help get you up to speed pretty quickly. You can open the user guide from the Help menu.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Button in/on Rectangle.

Post by mwieder » Thu Apr 26, 2012 7:35 pm

Also (and welcome)...
(It does not help that the two columns between Fill and Clear are unlabeled and Psychic Hotline are busy.)
if you hover the cursor over the blank columns on the property editor you'll see the tooltip explaining them.
When I put a rectangle over a rectangle, it will not fill with color.
Sounds like the "opaque" checkbox on the rectangle's property editor isn't checked.

kenift
Posts: 7
Joined: Thu Apr 26, 2012 6:35 pm

Re: Button in/on Rectangle.

Post by kenift » Thu Apr 26, 2012 8:23 pm

Thanks for your help.
Now I understand the blank stack size in inspector things should be easier.
Simple when you know how :)
Rebooted and now creating buttons OK.

Post Reply