Dear List,

Here some further remarks on my problem with the WinFocusChangedHandler.

Mark Ogilvie suggested that I should check the values of the currentwindow
and map_id variable (see code below) to test if the IDs of the application's
main window and the cloned window are really different. The result is
apparently they are. If I click on the main window, map_id and currentwindow
are the same, if I click on the cloned window, map_id and currentwindow are
not the same. The WinFocusChangedHandler always is executed, since the
contents of the message window changes (print statements). The button pad,
however, does not change as it was intended and as it is written in the
code. The button pad is only changed when I actually click on it. Is this a
bug ? Do I have to do something more to force an immediate update of the
button pad ? (Of course I could recreate it and reset its properties, but
this would probably cause some unwanted flickering.)


sub WinFocusChangedHandler
dim CurrentWindow as integer

'CurrentWindow is the window ID that has the focus, map_id (a global
variable) is 'the main map window ID of the application, determined on
startup of the app.

CurrentWindow = FrontWindow()
print "Map_ID: " & Str$(map_id)
print "CurrentWindow: " & Str$(CurrentWindow)

if currentwindow = map_id then
        alter button id 10001
                enable
        alter button id 10009
                enable
        alter button id FROM_BUTTON
                enable
        alter button id 10002
                enable
else
        alter button id 10001
                disable
        alter button id 10009
                disable
        alter button id FROM_BUTTON
                disable
        alter button id 10002
                disable
end if
end sub



Thomas G�lden
Diplom-Geologe

Email (privat):      [EMAIL PROTECTED]
Email (dienstl.):   [EMAIL PROTECTED]



----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to