I have textfields on a folder tab. I have code under
the MouseUp event handlers, but it dose not seem
to run. I This is on win7. Is there and enable or
something I have missed?
Code under the KeyUp event fires and works
just fine on these text fields.
And check the coordinates in MouseUp to figure out if the MouseClick has been released within or outside of the Control.
You probably dont want/expect an Action if its released outside…
You can’t return True to MouseDown in a TextField or TextArea. It would suppress all keyboard entries.
The only solution would be to start a 100ms or so multiple timer in keydown which would monitor the keyboard down state:
In Keydown:
TimerKeyUp.Mode = Timer.ModeMultiple
In The timer Action event:
[code]Dim down as boolean
For i as Integer = 0 to 255
if Keyboard.Asynkeydown(i) then
down = True
end if
If not down then
Sender.Mode = Timer.ModeOff
//This is the keyup
end if
next[/code]
Why do you need KeyUp there ? What are you trying to achieve ?
Not if you have another way to set the focus to the control. True, you can’t click in it but if another control gives it the focus, or you TAB into it, keystrokes are seen and handled fine.
This statement confuses me… as to how it would be considered correct?
What does the mousedown (true or false) have to do with normal keyboard operations?
I just created a test project with two textfield, one with TRUE in MD and one with nothing. I can click between them, and edit them both just fine… So I’m not sure what you consider the issue to be???
[quote=453191:@Dave S]This statement confuses me… as to how it would be considered correct?
What does the mousedown (true or false) have to do with normal keyboard operations?[/quote]
Both of you are correct - Sorry. I must have read much too fast. Returning True in MouseDown does not impair keyword operation in a TextField/TextArea.
However, indeed, returning True in MouseDown will impair all normal mouse operation. Meaning, no more selecting words or paragraphs with the mouse in order to copy or to delete.
@Luigi Faustini :
Here is the solution with a timer:
In MouseDown:
TimerMouseUp.Mode = Timer.ModeMultiple
In the Action event of the TimerMouseUp Action event:
[code]If not System.MouseDown then
Sender.Mode = Timer.ModeOff
//This is the MouseUp code