![]() |
are window select events possible?
Im workin on a ui and am wanting to make some buttons the default buttons in various windows but i want the button to not be the default when the window containing the button isnt the active window.
if youve lost me already, say i make the 'find items' button in the market (broker) window the default button. whenever i press enter it will run a search. now i dont want this all the time, say i click some other window, the broker window is no longer the active window, yet when i press enter it still runs the search for items (aside from the chat window typing a message which sends message instead). so basically, i was wanting to know if theres a way to have an event when the window isnt the active window or when it does become active. so i can have it set the find button to default when the window becomes active, and set it to not default when the window is no longer active. I know you can set the onhoverin and on hoverout events for when the mouse cursor is over and off the window, but thats not what im wanting. i have a fear that this isnt possible, but before i gave up on it, i wanted to see if anyone else had any ideas. |
Its sorta possible...
First off, the IsDefualt and IsCancel properties are captured by the top most window that uses those properties. So if you've got another window in focus that uses IsDefault, the IsDefault property on your Market window will be blocked. The thing is alot of windows don't use the IsDefault property for anything. You'd need to apply it to something in all the common windows to get the behavior you're looking for. Alternatively, you can set a pair of OnMouseIn/Out events for the Market window that sets the IsDefalut property to True/False. This would make it so the IsDefault only works while the mouse is over the Market window. |
ya, i know about the onhoverin onhoverout and having them set isdefaultbutton, but thats not a very good way of doing it, and i'd rather not have it set as default than have it coded very sloppily, prefer to keep things orderly.
I had also considered adding a size=0,0 button with isdefault to every single window, but thats also borderline sloppy. so i guess until a nicer solution presents itself, i'll just do without isdefault for now. thanks for tryin though. |
| All times are GMT -5. The time now is 07:46 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI