Link to home
Start Free TrialLog in
Avatar of JDN
JDN

asked on

Annoying text scroll in Textbox

Hi Foxpro Expert,

I'm having an annyoning problem with the Foxpro Textbox control in VFP9 (SP2).
When the control has focus and the mouse cursor is moved to the right while the left mouse button is down, the text in the Textbox scrolls to the left and disappears eventually.

Because I'm using a drag and drop function for a Textbox control (in a grid), it is very disturbing to see the text scroll and disappear instead of the normal drag action of the textbox.
This doesn't happen every time by the way, sometimes the dragging of the textbox works fine and sometime nothing is dragged and the text scrolls to the left and disappears.

I made the Textbox readonly, but no result. I Googled, but found nothing on this.

It's easy to simulate the described behaviour.
Simple put the mouse cursor in a Textbox, press the left mouse button and move the cursor to the left...

Thanks for any help
JDN
Avatar of Olaf Doschke
Olaf Doschke
Flag of Germany image

Well this is the behaviour, when selecting text in the textbox. If the text would be longer the scrolling really helps to select mor than is visible. Try Textbox Enabled = .F. If you only want this as a drop target, this should still work. Readonly still alows selecting text and therefore the same scrolling behaviour. Also make sure the textbox is allowing a drop action, decide for foxpro or ole drag&drop and set DragMode or OleDragMode to 1 perhaps.

Bye, Olaf.
If you strictly require textboxes without this scrolling feature but enabled for manual text entry then you have to place two textboxes on the same place. The one on top is disabled and the other one is enabled. Every character entered into enabled textbox has to be copied to the disabled textbox. Scrolling is allowed but not visible... Stupid idea, isn't it?
Set the InputMask for the TextBox to be small: "XXXXXXXXXXXXXXXXXXXXXXXXX".

Or specify the width of the textbox to be more than that it can display.

Or us an editbox instead.
ASKER CERTIFIED SOLUTION
Avatar of JDN
JDN

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Good work JDN!
Sorry for misunderstanding the Tetbox as drag trget insted of drag source. Glad you could solve it.

Bye, Olaf.
Avatar of EE_AutoDeleter
EE_AutoDeleter

I've requested that this question be deleted for the following reason:

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Not enough information to confirm an answer.

If you feel this question should be closed differently, post an objection and a moderator will read all objections and then close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Auto Deleter
In this case the answer stares at you...
EE_AutoDeleter again...

I am still convinced you are not human but a stupid piece of software.

Could you read this thread again and then mark ID: 24635234 as the answer?