Paradox Community

Items in pnews.paradox-development

Subject:Re: displacement Uiobject in a form
Date:14 Oct 2017 15:53:31 -0400
From:"Kevin Zawicki" <numberjack@wi.rr.com>
Newsgroups:pnews.paradox-development

note: setPosition is relative to the objects container


>
For ObjectPAL, the screen is a two-dimensional grid. The origin (0, 0) is
located at the upper-left corner of an object's container, with positive
x values extending to the right, and positive y values extending down.
<


get the container of the object and set its property to false
Design.ContainObjects =false

verify the container is the page, they try it, then reset container.


***you could also delete and create in some cases and control the container
Creates an object.

Syntax

1. create ( const objectType SmallInt, const x LongInt, const y LongInt,
const w LongInt, const h LongInt [, const container UIObject ] )
2. create ( const nativeObject Binary, const container UIObject ) Logical

Description

create creates the object specified in objectType (use one of the UIObjectTypes
constants) at a position specified in x and y, with a width specified in
w, and a height specified in h. x, y, w, and h are assumed to be in twips.
The optional argument container specifies a container object for the new
object.

Syntax 2, uses create to create the object specified by nativeObject. nativeObject
is a binary object that can be generated by pasting a UIObject (Corel Form
Object) from the Clipboard. create works only in form design mode. create
returns True if successful; otherwise it returns False.

 Note

	When you use create to create an object, the object is invisible. To make
it visible, set its Visible property to True. To delete an object at run
time use the delete method.



see:
Sets the position of an object.

Syntax

setPosition ( const x LongInt, const y LongInt, const w LongInt, const h
LongInt)

Description

setPosition sets the position of an object on the screen. Variables x and
y specify the coordinates of an object's upper-left corner (in twips). Variables
w and h specify the object's width and height (in twips). If the object is
not specified, self is implied.

This method does not work when the UIObjects are forms. To set the position
of a form, use setPosition (Form type).

You can also set and examine an object's position and size using the Position
and Size properties.

self.Position = Point(100, 150)
self.Size = Point(2000, 2500)

The following code performs that same function as the previous code:

self.setPosition(100, 150, 2000, 2500)

For ObjectPAL, the screen is a two-dimensional grid. The origin (0, 0) is
located at the upper-left corner of an object's container, with positive
x values extending to the right, and positive y values extending down.

For dialog boxes and for the Paradox desktop application, the position is
specified relative to the entire screen . For forms, reports, and table windows,
the position is specified relative to the Paradox desktop.



"cesqui" <distrimail@yahoo.fr> wrote:
>
>Hello everyone,
>
>I'm looking for a way to move an object on a form from one container to
another
>container.
>
>I tried several writes with the setposition method but without success because
>the object remains in the same container.
>
>Do you have a solution ?
>
>Thank you


Copyright © 2004 thedbcommunity.com