Solved Move control in run time

Discussion forum about all things Team Developer 5.x and 6.x
kiriand@01
Italy
Posts: 19
Joined: 04 Jan 2019, 15:44
Location: Italy

Move control in run time

Post by kiriand@01 » 12 Oct 2020, 14:21

Hi.

Iis it possible to define the position of a control to sam create oe another event?

Best Regard
Andrea

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1473
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Move control in run time

Post by Igor Ivanovic » 13 Oct 2020, 06:08

Hi,

You can use VisWinMove, part of the VisualToolchest which is included with TD.
Igor Ivanovic
Image

kiriand@01
Italy
Posts: 19
Joined: 04 Jan 2019, 15:44
Location: Italy

Re: Move control in run time

Post by kiriand@01 » 13 Oct 2020, 07:13

Tank's Igor

I try immediately...

kiriand@01
Italy
Posts: 19
Joined: 04 Jan 2019, 15:44
Location: Italy

Re: Move control in run time

Post by kiriand@01 » 13 Oct 2020, 07:36

I am trying this code, but the datafield disappears, where am i wrong?


On SAM_Create
Call VisWinMove(dfnAVAILABLE_FUNDS,2.183,0.988,1.93,0.25)

kiriand@01
Italy
Posts: 19
Joined: 04 Jan 2019, 15:44
Location: Italy

Re: Move control in run time

Post by kiriand@01 » 13 Oct 2020, 08:09

Maybe I understand, the values ​​I put come from the control properties and are expressed in inches, I converted them to pixels and now I see it.
However I expected to find it in the same original location.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Move control in run time

Post by Dave Rabelink » 13 Oct 2020, 10:16

Yes. VisWinMove uses pixels.

You can use SalSetWindowLoc which uses form units.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

kiriand@01
Italy
Posts: 19
Joined: 04 Jan 2019, 15:44
Location: Italy

Re: Move control in run time

Post by kiriand@01 » 13 Oct 2020, 13:14

Tanks! Dave

Was what I needed...

Andrea

Return to “General Discussion TD 5.x and 6.x”

Who is online

Users browsing this forum: [Ccbot] and 5 guests