Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


I'm writing an accounting application and on the data entry Form I use a
macro to automatically fill in fields for regular recurring entries, e.g. a
payment of a Gas or Electricity bill.  This speed up the data entry a lot,
as usually the only fields that need changing are the Date and Amount
fields.  Then I use the following code to position the cursor in the Amount
field :-

*Sub SetCursor(ThisComponent as Object, ControlName as String)
    Dim oControl        AS Object
    Dim oController     AS Object
    Dim oControlView    AS Object

    oControl      = oFormTransHeader.getByName(ControlName)
    oController  = oControl.Parent.Parent.Parent.CurrentController
    oControlView = oController.GetControl(oControl)
    oControlView.SetFocus()
End Sub

*This works well, but what I haven't been able to work out is how to
highlight the Amount field so that the user can then type in the new amount
over the top of the existing amount.  The user could just type Ctrl + A,
but I'm trying to reduce key strokes to as few as possible.

I've looked for code that would send Ctrl + A to the form, but drew a blank
on that.
I've also xRayed *oControlView*, but there doesn't seem to be any method
there that does highlighting either.

Can anyone point me to a solution?

Thanks,

Noel
--
Marion & Noel Lodge
lodgemn@gmail.com

-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.