Giter Site home page Giter Site logo

Comments (22)

xomx avatar xomx commented on June 8, 2024 3

It has to be that, it is due to reserved space for a possible GUI translation.

English text labels are usually shorter than its translated counterparts. So a label area has to be somewhat longer, e.g.:

npp-longer-text-fields-for-translation

from notepad-plus-plus.

donho avatar donho commented on June 8, 2024 2

It's not bug.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024 2

@kaustubh43

I presume this is a problem for you when the Find window is not focused but you want to make it active and you do so with the mouse by clicking in what you think is an empty area.

If this is the case, then suggest workarounds of (pick one):

  • Always click the titlebar of the Find window to activate it
  • Use the direct keycombo for the Find window tab page you want to go to (e.g., Ctrl+f, Ctrl+h, etc) -- this is not ideal because Find in Projects doesn't have a keycombo, and/or pressing Ctrl+f can auto-populate Find what with text from the editor window and that may not be wanted
  • A high percentage of the time, users want to make the Find window active to make a change to Find what ; thus, simply click directly in the Find what edit box (activates the window and gives the Find what edit box input focus)

from notepad-plus-plus.

kaustubh43 avatar kaustubh43 commented on June 8, 2024 2

@alankilborn Yes, that is when the issue exactly occurs(when Find window is not focused). It has led to me missing out on keywords that I am searching for, simply because some option got checked.

We can close this issue since it is identified as infeasible.

from notepad-plus-plus.

ozone10 avatar ozone10 commented on June 8, 2024 2

@alankilborn @xomx
if it's only checkboxes and radio buttons it's easy when using Button_GetIdealSize

@kaustubh43
you can check PR

Still I am not sure if it will be accepted.

from notepad-plus-plus.

xomx avatar xomx commented on June 8, 2024 1

Perhaps I was seeking the "short answer"

Thanks to your persisting answer-searching and the @ozone10 UI programming skillz, we will probably have more error-proof and useful app-GUI. Moreover I learned something new useful, so 👍

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

@xomx
Is it feasible to resize (at runtime) such controls after they get their localization text set, so that @kaustubh43 's complaint would not occur?

from notepad-plus-plus.

xomx avatar xomx commented on June 8, 2024

@alankilborn

Is it feasible to resize (at runtime) such controls after they get their localization text set

Yes (probably, I did something like that a long time ago, I do not remember much). But you have to set the dynamic layout properties programmatically at runtime because the N++ users can change their langs at runtime too. For that you use the CreateDialogIndirectParam WINAPI, which creates a modeless dlg from a dlg template in memory (and not from the static resource one...). So that way all is theoretically customizable, even the ctrl label sizes (you adjust your in-memory dlg-template by checking the ctrl current text length, recalculate to actual pixel-size, an so on...). IMO - too much hassle for too little gain.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

@xomx

"too much hassle for too little gain" == "infeasible" :-)

I wonder if it gets more reasonable if you don't worry about it when users change their localization language at runtime -- users typically only do this once anyway.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

@kaustubh43 As the original petitioner, you should be the one to close it -- thanks.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

Final thought, and I'm interested in @xomx 's opinion most here, I suppose: Should a click anywhere (client area) on an inactive window simply activate the window, or, if the click happens to be on a control, should it activate the window AND actuate the control's functionality?

from notepad-plus-plus.

kaustubh43 avatar kaustubh43 commented on June 8, 2024

@alankilborn I suppose it is already closed. Correct me if I am wrong. Thank you!

from notepad-plus-plus.

xomx avatar xomx commented on June 8, 2024

@ozone10
Nice, works ok!
I was originally going to ping you with this, but then I decided I would not bother you with this one :-)

@alankilborn

should it activate the window AND actuate the control's functionality

this one is correct, test:
DlgApp.zip

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

this one is correct, test:
DlgApp.zip

I'm away from my PC until late tomorrow -- give me a preview, though... what is this DlgApp ?

from notepad-plus-plus.

xomx avatar xomx commented on June 8, 2024

@alankilborn
The simplest possible app based on DialogBox WINAPI - and it reacts exactly according to your second option.
DlgApp

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

and it reacts exactly according to your second option.

Still not back at PC but presume this means that this little demo dialog app, when it doesn't have input focus but you move the mouse and click on Check 1 that it will activate the app AND check the checkbox in one action?

I notice that different apps act differently in this regard, the most recent example in my mind about this is Windows' "Snipping Tool". If I take a screenshot with Win+Shift+s, then "Snipping Tool" opens, and for me it does so with the "yellow highlighter" tool active and ready to go to make highlights on the captured image. If I then shift input focus to another app (e.g. N++), but then realize I want to do more highlighting on the image, I can see "Snipping Tool" seems to be set up to continue my yellow highlighting. But, if I move to the inactive window and click+drag to highlight, the window is made active but highlighting doesn't happen. I have to lift the mouse and restart my click+drag to do it.

So the "Snipping Tool" example isn't exactly the same situation, (as the checkbox example) but I'm just wondering if there is supposed to be some sort of standard in this regard?

from notepad-plus-plus.

xomx avatar xomx commented on June 8, 2024

this little demo dialog app, when it doesn't have input focus but you move the mouse and click on Check 1 that it will activate the app AND check the checkbox in one action?

Yes.
I chose that DialogBox app to match the reported N++ problem with Find-dlg as closely as possible and to rule out a bug or non-standard behavior of the N++.

I notice that different apps act differently in this regard,

I can confirm this.
While I e.g. opened a Firefox and overlapped it partially with Explorer, clicking in to the inactive Firefox-wnd on a place where is something possible to activate, it works as in the N++ Find-dlg case. But when I used the MS Word instead of the Firefox, it behaves like in your SnippingTool case.

I'm just wondering if there is supposed to be some sort of standard in this regard?

Probably not. I guess that it will depend on the GUI framework and on the relevant Windows messages handling used.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

I'm just wondering if there is supposed to be some sort of standard in this regard?

Probably not. I guess that it will depend on the GUI framework and on the relevant Windows messages handling used.

What I meant was, if there IS a standard, Notepad++ could be made to follow that standard. But...if no standard...then it is a free-for-all.

So in 2 Microsoft apps (my Snipping Tool example and your Word example) that work similarly in this regard...could it be a Microsoft standard, and, as the Operating System vendor, that's enough to set a pseudo-standard? This has clearly caused a problem for @kaustubh43 in this issue (i.e., if clicking a control merely activates an inactive window, and doesn't execute control functionality, this issue would be moot).

from notepad-plus-plus.

xomx avatar xomx commented on June 8, 2024

could it be a Microsoft standard

Try MS Notepad, it works the other way around.

if clicking a control merely activates an inactive window, and doesn't execute control functionality, this issue would be moot

I have to admit - I prefer one click to activate a func in the currently inactive app-wnd. I am sometimes sloppy and have app-wnds over each other and it would slow me down if I had to click twice every time.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

Try MS Notepad, it works the other way around.

Microsoft consistency is officially out the window now! :-)


I prefer one click to activate a func in the currently inactive app-wnd. I am sometimes sloppy and have app-wnds over each other and it would slow me down if I had to click twice every time.

I'm certain you are not alone in this.
Perhaps I was seeking the "short answer" to solving #14897 :-)

from notepad-plus-plus.

kaustubh43 avatar kaustubh43 commented on June 8, 2024

This has clearly caused a problem for @kaustubh43 in this issue (i.e., if clicking a control merely activates an inactive window, and doesn't execute control functionality, this issue would be moot).

@alankilborn exactly my issue, it does check/uncheck if I click on it and it is out of focus.

Thank you guys for the support.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 8, 2024

So there's two schools of thought...if the Find window is not active:

  • a click anywhere in it should simply activate the window
  • a click on a control in the window should activate the window and then run the clicked-on control's click event

from notepad-plus-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.