O$ creating a drag rectangle on the thick client
Paul Mulroney
pmulroney at logicaldevelopments.com.au
Tue Jun 23 21:22:51 EDT 2020
Hi Everyone,
I got this working! I now have a selection box with handles that can be resized. It was pretty easy to implement using Bas' idea of a foreground shape object. The tricky part is that we use the screen scaling feature, and when you do that your coordinates get a bit wacky.
Thanks for the input everyone - you guys rock!
Regards,
Paul.
> On 22 Jun 2020, at 2:40 pm, Bastiaan Olij <bastiaan.olij at jobbag.com> wrote:
>
> Hey Paul,
>
> It's been a long time since I played with this type of thing but if I'm not mistaken you can set the property $selected on any window field and it will enable the handles that allow you to move and resize the field, even in runtime.
>
> So for a rectangle you could simply using a kBobj shape field, turn $selected to true and it can be moved around the window.
> ________________________________
> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> on behalf of Paul Mulroney <pmulroney at logicaldevelopments.com.au>
> Sent: Monday, 22 June 2020 12:56 PM
> To: Omnis-dev list <omnisdev-en at lists.omnis-dev.com>
> Subject: O$ creating a drag rectangle on the thick client
>
> Hi Everyone,
>
> I'm working on a feature where I want the user to be able to draw a rectangle onto an image on a window in the runtime. At the moment it's pretty basic - I can track the mouse down and mouse up events, and then it draws the box. However, it would be really cool if the user saw a rectangle as they moved the mouse after clicking mouse down - like drawing a box in a drawing program. For double bonus points it'd be awesome if they could later on select the rectangle and resize it.
>
> I don't think there's any functionality in Omnis that allows us to do that in the runtime. Has anyone done something like this in the past, and are willing to share?
>
> Regards,
> Paul.
Failure is not an option. It comes bundled with your Microsoft product.
(Geeky One Line Jokes http://bit.ly/XU8lFD)
--
Paul W. Mulroney We Don't Do Simple Pty Ltd
pmulroney at logicaldevelopments.com.au Trading as Logical Developments
www.logicaldevelopments.com.au ACN 161 009 374
Ph: +61 8 9458 3889 86 Coolgardie Street
BENTLEY WA 6102
More information about the omnisdev-en
mailing list