Selectable label blocking KeyDown

Hi guys,
Is selectable label can block keydown event?
I have a movieplayer and a label on it which is selectable. When i select a word on the label, the keydown event stops working.
I tried:

  • a timer setting the focus back to the window
  • same keydown event on controls

Keys : q, e, space (because the movieplayer blocking the arrows)

By selecting the label, you take away the focus from another control, and since labels can’t be focused, in practice the window should get the keyDown.

Have you tried MoviePlayer.Setfocus ?

Thank you Michel, that was the problem. Now i need to figure out how to get one word from a sentence on a label. Is it possible?
Maybe double click select a word and set the focus to the mp?

I would not use a label for that, but rather a read-only TextField. That way you get the Selchange event, as well as SelStart and SelLength to find the selected text.

is there a way to make the textfield background transparent?

You are under Windows, right ? You should get into the habit of posting in the Windows channel.

Make the super of the TextField TextArea, and use the declare posted there
https://forum.xojo.com/13648-how-to-create-something-like-a-transparent-textarea/0

I usually develop for ios and osx platform, rarely for windows. Its for osx at the moment, I chose “general” because the topic is about the xojo ide controls.

Please don’t post in “General” when you have a question about a specific platform. Controls are native controls to each platform, and although they have the same name, they do not have the same underlying framework. And that will save time for others.

Michel, You helped a lot, there is a declare in that topic which erase the background of the textarea. Textarea has the events you mentioned above. I will just copy the selected text to a variable and set the focus back to the mp.

Next time i will be more specific.