O$ creating a drag rectangle on the thick client
Paul Mulroney
pmulroney at logicaldevelopments.com.au
Wed Jun 24 20:47:11 EDT 2020
Hi Das,
Thanks for your email. I don't know if the coordinates update live, because in my library I don't need to know.
I setup the window with a "shape object", which is a foreground component. I set the properties of it so it's a rectangle with transparent background etc. Normally it's not visible.
I settled on this mode of operation:
- User clicks Edit on the record.
- User clicks a "set bounds" button. The shape object is made visible and starts with a default position. I set $selected on the object to kTrue. The resizing handles appear.
- If the user doesn't want the bounds they can click the "Clear Bounds" box. This hides the object.
- The user can resize the object as required until they are happy with the position and then they click Save. I save the $top, $left, $width, $height of the object, and set $selected to kfalse.
The resizing handles are built-in functionality of Omnis - I don't need to do anything to make them work.
For this particular project I have a scanned image of a ship's journal, and the user draws a box around the handwritten text. Since the lines are always evenly spaced I can use the bounding box to determine which line they've clicked on and then select the corresponding line in the transcribed text which is displayed alongside.
It's a fascinating project, and when it's complete I'd love to show you all how it all turned out.
Regards,
Paul.
> On 25 Jun 2020, at 1:31 am, Das Goravani <das at Goravani.com> wrote:
>
>
> Paul
>
> If I may ask you.. just checking..
>
> When the user drags the handles.. do you know if it updates the coordinates live as they drag.. the left, right, top, height, are they updated as they drag in Omnis.. so that you could say size something else as they drag the handles.. or are they only updated at the release.. ???
>
> And you can do this with a regularly placed bobj right.. not that you have to place one then change it via code.. you said you placed something then changed it to something.. what type of bobj or obj does this work with?
>
> I can experiment and find out but I just thought I’d ask you.
>
> Your joke quotes are the bomb.. the one you had today I posted to facebook it’s so good
>
> Failure is not an option. It comes bundled with your Microsoft product.
>
> Ha hahahhaha
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
My son wants a pet spider for his birthday, so went to our local pet shop & they were $70! I thought, I can get one cheaper off the web. @ProCopy_Aus on Twitter
--
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