Perhaps the title is a bit misleading… so let me explain.
App with two windows… one a “document” style window (the main window) and another a “floating window”
The main window has a custom cursor…
When the floating window is activated … it has a different custom cursor
HOWEVER, when the cursor is moved back over the main window (and MOUSEENTER is fired) the cursor does NOT change back.
it requires the user CLICK on the main window again. This (in my opinion) defeats the purpose of a floating window.
I have tracked ALL of the events that are exposed for a Window and only MOUSEENTER fires (as expected)… Attempts to SETFOCUS etc seem to be totally ignored…
So my question is… What is happening if the user CLICKS the window, as opposed to any event I can force during a MOUSEENTER.
Basically I need these two window to both be visible, and have everything (focus, cursor etc) change seamlessly when the user causes the mouse to enter or exit either window… Clicking to regain cursor is not acceptable as the main window is mostly a single Canvas, and clicking invokes other events that are not appropriate when changing window views.
The MOUSEENTER on the canvas fires, where there is code to reset the cursor… but the cursor DOES NOT change…
It seems that something is mucking with the cursor, and as long as another window is open, I lose all control of the cursor image in the main window. Even if I tell mouseenter to SETFOCUS…
The instant I close the floating window the cursor immediately returns to the desired image.
It seems to me the events do only fire when the window is activated. Question is: How do you activate a window when the mouse hovers over it when mouse enter fires only when it is activated?
BTW, it seems to me mouseexit suffers under the same conditions. I have a custom Clickbox that changes its picture according to its state. When it activates another window, the main window becomes deactivated and therefore the picture is wrong. I could change this however in its Activate event, but like in Daves example the user always has to click on the floating window to activate it before he can interact with it as sonn as it lost its focus.
And like written elsewhere he, the window loses its floating state as long as a child HUD window is opened. It is returned to floating the moment the child window closes.
it worked fine before in Carbon using XML defined cursors… but that cursor style doesn’t seem to work at all any more, plus I wanted slightly larger (and color) cursors when I moved to Cocoa.
Tried it with Xojo 2013 R3.3 (last one to run on my Snow Leo system) and it still works.
dim w as new winFloat
w.show
Run the app. Floating window has active titlebar (with the close etc buttons).
Mouse entering the floating window changes the cursor to the FingerPointer as expected.
Mouse leaving the floating window changes it to standard cursor, not HandClosed cursor (hmmmmm )
Clicking on main window -> floating window looses focus
Moving mouse in does NOT change cursor. I need to click on the titlebar and make it the active window before the cursor changes. Clicking inside the window has no effect on the cursor.
Hello,
I have a similar problem because if I leave the ‘Global Floating Window’ in COCOA when I come back I can not focus on a textfield that needs focus, only if I click on, not for me ran “Me.Show” on Mouse Enter, any suggestions ?