[Gambas-user] Control widths, fonts, desktop scales, strings and a bad memory

Benoît Minisini g4mba5 at gmail.com
Mon Sep 3 17:20:25 CEST 2018


Le 03/09/2018 à 17:00, Me a écrit :
> Thanks guys, I'm going to muck around with the Control.Font.TextWidth() function for a while to see if I can get what I want, which is
> 
> I want the control size, layout and font etc to stay the same. What I want to do is manipulate the displayed text from it's original length with ellipses on (possibly)
> both sides so the salient bit of the original text will fit in the control.  We get (text) messages that have a certain "payload" in them, Sometimes they are pre and
> post appended with random amounts of garbage. The idea was to locate the payload bit, or perhaps I could put that better "the suspected payload bit" in front
> of the user and have them confirm we are looking at the correct bit or not. (The payload bit is entered by human operators so it's not guaranteed to conform to
> any standard presentation. Further, the messages come from a number of different sender systems, so we have no control over how much junk is added to the
>   message.)  The idea would be to find a chunk in the message that looks like it might be the payload and present that to the user for confirmation, sort of like
> this if I can make text into a picture:
> 
> Suspected payload: [ ... Vendor 60234 Lot 34 withdrawn 10:34AEST. message sent 10:42:16 fr ... ]
> 
> The bit we are after is "Vendor 60234 Lot 34 withdrawn" but it may have come in as "Vendor 60234 has withdrawn lot 34" or any other unimaginable way a person can type the same information, "We have withdrawn lot 34 on behalf of vendor J. Bloggs (60234)" etc etc.
> 
> When things get busy we get lots of these messages per minute. 80% are automatically handled but we need to speed up the manual handling of the remainder.  At the moment the user haas to scroll through the entire message to find the payload info and then reenter that info into a fomatted entry form. This is too slow.
> 
> I'll get back later on this.
> thanks
> bruce
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 

If you want to "ellipsize" a text, you can use Paint.TrimText() or 
Paint.TrimRichText() during a Paint.

Regards,

-- 
Benoît Minisini


More information about the User mailing list