O$ creating a drag rectangle on the thick client

Paul Mulroney pmulroney at logicaldevelopments.com.au
Mon Jun 22 21:47:08 EDT 2020


Hi Das,

Thanks for your message.  My first attempt was pretty simple: on mousedown, record the x,y of the mouse and on mouseup draw a box using the first x,y and last x,y.  It didn't handle resize or move or anything like that. 

I'm going to try Bas' suggestion about using a foreground shape object and $selected.  That should take a lot of hard work out of it!

I don't often need drawing tools in Omnis at the user level, but I must admit it would be very cool if we had something available ...

Regards,
Paul.


> On 23 Jun 2020, at 1:06 am, Das Goravani <das at Goravani.com> wrote:
> 
> 
> I’ve done a lot of resizing of objects in Runtime.. but it’s not perfect.. but it’s OK…. You have your rectangle, and they click on it.. you sense that.. you are now in size mode.. there is a way to trap movement live.. as they move the mouse you get constant new positions and you resize your rectangle accordingly as they move the mouse.. 
> 
> It’s WHILE moudedown thing.. I have it in code.. dont know if this suffices for you.. they would see the rectangle change size as you move the mouse… though there would not be grab handle corners.. it’s just a kludge.. 
> 
> If you need the while mousedown code let me know and I’ll dig it out.. 
> 
> I think this is the kind of area where Omnis lacks.. drawing tools and liquid interface tools… it’s a business language… not a language.. and I hit that wall constantly.. as I want interface goodies like this.. 
> 
>> On Jun 21, 2020, at 7:56 PM, Paul Mulroney <pmulroney at logicaldevelopments.com.au> wrote:
>> 
>> 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.
>> 
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 


I remember the first time I saw a universal remote control … I though to myself "Well, this changes everything"
-- 
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