Page 1 of 1

#PB_EventType_Focus/LostFocus for all gadgets

Posted: Wed Dec 04, 2013 2:16 pm
by PB
Please add this EventType() for all gadgets can be given the
focus by clicking or tabbing to them. Thanks! :) As per this:

http://www.purebasic.fr/english/viewtop ... 22#p432222

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Wed Dec 04, 2013 6:22 pm
by freak
If we add this for buttons, then you always need to check EventType() when you receive an event for the button to know if it was a click or focus event. Right now you don't need that because buttons only report the click event. I don't see much use in focus events for buttons (your example is the rare exception), so its not worth it imho.

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 1:19 am
by BorisTheOld
freak wrote:If we add this for buttons, then you always need to check EventType() when you receive an event for the button to know if it was a click or focus event. Right now you don't need that because buttons only report the click event. I don't see much use in focus events for buttons (your example is the rare exception), so its not worth it imho.
That has to be the most bizarre reasoning I ever heard. And just because you can't think of any reason for Button focus events, doesn't mean there aren't any. There have been many requests for extra events, particularly Focus/LostFocus for buttons, so it's reasonable to assume that the requestors know something you don't know.

I think you're being more than a little presumptuous in assuming that you know best what people should, or should not, be doing in their code. In my own case, it was very much worth spending time to write many custom gadgets (based on the Canvas gadget), to gain access to more event types.

Perhaps it would be better if you listened politely to peoples requests, even if you have no intention of implementing what they ask for.

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 1:36 am
by netmaestro
Perhaps it would be better if you listened politely to peoples requests, even if you have no intention of implementing what they ask for.
I won't weigh in on the usefulness or lack thereof for the given feature request, I don't have a dog in this fight. But pique aside, I prefer a response like Freak's to polite silence any day. At least you know what to (or not to) expect.

"Give it to me straight, Doctor! I can take it!"
-Johnny Fever

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 8:50 am
by PB
> you always need to check EventType() when you receive an
> event for the button to know if it was a click or focus event

Cool, that's no problem for us a customer at all. :D

> I don't see much use in focus events for buttons (your example
> is the rare exception), so its not worth it imho.

That's a shame, then. :( Keyboard navigation means nothing?
What if I want to change the color of the button that gets the
focus, or its text, or size? There are many examples. Oh well.

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 10:27 am
by davido
I do not find freak's replies, to be in any way, impolite.
I find his replies to be Honest; incisive and to the point.

I may not always like the answer, but I know exactly what the situation is. Please keep it that way, freak.

After all a 'spade' really is a 'spade' !

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 11:57 am
by Fangbeast
That's a shame, then. :( Keyboard navigation means nothing?
What if I want to change the color of the button that gets the
focus, or its text, or size? There are many examples. Oh well.
I was using NetMaestro's MouseHoverEvent source library (I think that's the right name?) to do this sort of thing and use ImageGadgets as pseudo buttons to change the graphic as the mouse hovered over and it looked really nice. I know it can do more than what I used it for.

My home inventory program didn't look too bad at all.

Would like NetMaestro's library to be native so we could do just what you suggested PB. Personal choice of course. NetMaestro's MouseHoverEvent code has come in handy for a few of my programs lately.

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 12:05 pm
by PB
But I'm talking about getting the focus; not hovering.
Hovering is a totally different kettle of fish altogether.
It was just a wish anyway, as this section is for. :)

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Thu Dec 05, 2013 8:41 pm
by Fangbeast
PB wrote:But I'm talking about getting the focus; not hovering.
Hovering is a totally different kettle of fish altogether.
It was just a wish anyway, as this section is for. :)
I misunderstood as I thought when the mouse hovered over a gadget, it got the focus and you could detect it. Sorry.

Re: #PB_EventType_Focus/LostFocus for all gadgets

Posted: Fri Dec 06, 2013 12:55 am
by IdeasVacuum