This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH setup] Make Enter in the user URL box cause ADD instead of NEXT


On 12/7/2017 11:55 PM, Brian Inglis wrote:
On 2017-12-07 13:46, Ken Brown wrote:
On 12/7/2017 1:35 PM, Jon Turney wrote:
On 05/12/2017 17:32, Ken Brown wrote:
On 12/5/2017 11:03 AM, Ken Brown wrote:
On 12/5/2017 7:58 AM, Jon Turney wrote:
The search textbox on the package chooser page needs the same fix.
It's not immediately clear to me how to do this, since I don't know what the
default pushbutton should be while the user is typing in the search box.
One possibility is to convert the label "Search" to the left of the box to a
SEARCH pushbutton, whose effect is to call OnTimerMessage(). If we make this
the default, then pressing Enter will cause the search filter to immediately
take effect, which is probably what the user expects.
It seems a bit weird to have a button which automatically pushes itself half a
second after you finish typing.
Attached is my attempt, which (ab)uses an invisible button.
I agree, this is better than my version.
Something like the attached?  This might not be quite right, because the
previous default button is never restored.  I'm not sure how important that is.
I think it's something that should be done, if possible, so I added that.
In my testing, 'Next' does indeed become the default button after I click
outside of the textbox, but there's no visual indication of this.
The MSDN page for DM_SETDEFID
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms645413(v=vs.85).aspx) mentions
a different situation where button highlighting doesn't accurately reflect the
default button.  In that case it suggests sending a BM_SETSTYLE message to
change the border style.
I looked at the documentation for BM_SETSTYLE, but it wasn't obvious to me what
do do.

Seems like you want to change the button state not style - checking around you
might want to use Button_SetState macro or BM_SETSTATE message TRUE to
highlight, FALSE to reset:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb849168(v=vs.85).aspx

with Button_SetStyle macro or BM_SETSTYLE message style BS_DEFPUSHBUTTON |
BS_CENTER | BS_VCENTER | BS_TEXT | ...  as appropriate, so that ENTER works like
a click:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb775951(v=vs.85).aspx

Thanks for the suggestions, but I tried various BM_SETSTATE and BM_SETSTYLE messages, and I couldn't find anything that worked: 'Next' remained unhighlighted.

Ken


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]