Source language: Translate to:

Text Entry to Top

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Text Entry to Top

Postby datadon » Thu Jul 01, 2010 8:49 am

One thing that has bugged me forever and it seems I have found work arounds before, is that when loading a text entry box with data, it will scroll down to the bottom of the data.

I would LOVE to see an option in the text box that would take it back to the top of the data.

Or perhaps there is an easy solution that I have not known about or forgotten.

Thanks
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby Gaev » Thu Jul 01, 2010 9:48 am

Don:

What do you mean by loading a text entry box with data ? ... is the user doing a paste from the Clipboard (Ctrl+V) ? ... or is there are SetVar command doing it ?

If it is the latter, do something like ...
Code: Select all
SetVar "[textEntry2]" "abcd"
SendKeys "" "{Home}"
... depending on your circumstances, you may need to add a FocusObject command before the SendKeys.

You can also append a (tiny) button to the right of the TextEntry Box which would do the FocusObject/SendKeys commands when clicked.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby datadon » Thu Jul 01, 2010 10:42 am

Ok, yes that was the way I did it in the past probably due to your reply then. This getting old is for the birds.

Actually it is just a textentry field that is disabled and is used to display a field in the database. I just added your sendkeys code to the on text change and it seems to work well. I will try on the others also.

However, it still would be a nice feature if a check box could be added to do this. I know lazy lazy man. Never add a feature that can be coded in or out.

Hey I am into lazy when I can't remember the code.

Thanks again and again Gaev.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby datadon » Thu Jul 01, 2010 10:48 am

I spoke a little too soon. That placement of the code does not work on fields that need to be edited. What would be the best placement for the code when the field needs to be edited? On record change? How would that work?
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby Gaev » Thu Jul 01, 2010 1:14 pm

Don:

I don't think it is a good idea to place the SendKeys command in the Text Change section of the TextEntry Box.

In the "subroutine" specified within the dbpOpenTable command ... whenever you do a SetVar command to transfer the contents of a field to the TextEntry Box, immediately follow it up with a FocusObject and a Sendkeys command.


Alternately, you could look for the value of a variable in the Text Change section of the TextEntry Box ...
Code: Select all
If "[SetCursor]" "=" "HomePosition"
   SendKeys "" "{Home}"
EndIf
... and control the value of [SetCursor] from within the Text Change section.

Note that the Text Change section is triggered when I do a SetVar command that populates the value of the TexEntry Box with the contents of another variable; have not not verified if it is triggered when updating it with a database field from within the database subroutine section.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests