[Implemented] Improve the input requester
[Implemented] Improve the input requester
I recently started using two monitors and encountered some inconsistencies in my code beside some annoyances. One it that the input requester is always shown on the primary monitor. So I hereby declare it would be a good idea to add an optional parameter for a parent window, which is used for alignment. A parent window would also give us the possibility to set whether it shall get its own icon on the taskbar or not.
Also I'm aware that I can easy peasy build an own dialogue, which I certainly will. Maybe with some more customizations, maybe worth releasing it into the Tipps&Tricks-section, maybe not.
Also I'm aware that I can easy peasy build an own dialogue, which I certainly will. Maybe with some more customizations, maybe worth releasing it into the Tipps&Tricks-section, maybe not.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: Improve the input requester
Not worth it. There are already many ...jacdelad wrote: Tue Jan 17, 2023 4:51 pm Also I'm aware that I can easy peasy build an own dialogue, which I certainly will. Maybe with some more customizations, maybe worth releasing it into the Tipps&Tricks-section, maybe not.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Improve the input requester
Just be aware that some users with multiple monitors actually want that. I had a custom requester which I opened in the center of multi-monitors, and got negative (but polite) feedback from several people asking for an option to only show it on their main monitor. I even started a topic about it here recently (how to determine the primary monitor).jacdelad wrote: Tue Jan 17, 2023 4:51 pmI recently started using two monitors and encountered some inconsistencies in my code beside some annoyances. One it that the input requester is always shown on the primary monitor.
Re: Improve the input requester
Oh ok.
Well, that's why I thought a few more options would be nice.
I'll simply create my own requesters, they'll suit me.
Thanks anyway.
Well, that's why I thought a few more options would be nice.
I'll simply create my own requesters, they'll suit me.
Thanks anyway.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: Improve the input requester
It should indeed have an option to declare where it should be shown. Mainly primary monitor or the monitor that contains the active window. A simple quality of life improvement.
Re: Improve the input requester
I agree that the request is valid, for sure. An optional parent window is a great idea. Just make that optional in your app for your users, is all I meant. Some will like it; some won't.
Re: Improve the input requester
+1 to all requesters.
I personally use different methods to center dialogs to there parent windows. Would be cool, if that could be done by optional parameter.
In multi-monitor settings, special attention must be paid to the margins. Dialogs should not be displayed on/over two monitors, because the middle is hidden by the monitor margins.
I therefore move the dialogs to the monitor on which the dialog would be displayed predominantly, when I would not intervene....
Only some spontaneous thoughts in addition.
I personally use different methods to center dialogs to there parent windows. Would be cool, if that could be done by optional parameter.
In multi-monitor settings, special attention must be paid to the margins. Dialogs should not be displayed on/over two monitors, because the middle is hidden by the monitor margins.
I therefore move the dialogs to the monitor on which the dialog would be displayed predominantly, when I would not intervene....
Only some spontaneous thoughts in addition.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: Improve the input requester
Huh? No, they're not. The dialog/window is always split evenly over two monitors, with no parts missing. I've never seen part of a dialog/window that isn't visible due to being shared over two monitors at once. If it is for you, then that sounds like a physical monitor display setting issue, rather than the OS hiding the middle of the dialog/window. Show me an example if I'm wrong, because I'd like to see this.Axolotl wrote: Wed Jan 18, 2023 11:59 amDialogs should not be displayed on/over two monitors, because the middle is hidden by the monitor margins.
Re: Improve the input requester
Arghh, sorry.
Of course no information (pixels) is missing.
What I was trying to write is, that it doesn't look nice when a messagebox is drawn over two monitors.
Of course no information (pixels) is missing.
What I was trying to write is, that it doesn't look nice when a messagebox is drawn over two monitors.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: Improve the input requester
Oh, right. I thought you were saying the middle of the dialog was getting cut out by being in the center of two monitors, and I was Googling to find how a monitor margin setting might be doing that. I can stop looking now! Hehe.
Re: Improve the input requester
There is a case that can create missing pixels when the dialog is overlapping screens... If you have a laptop and a monitor (my laptop is my primary setup), and the resolution does not match. When I got my 4k monitor before I upgraded my laptop, i dealt with this issue when using both screens.
Re: Improve the input requester
+1BarryG wrote: Wed Jan 18, 2023 11:15 am I agree that the request is valid, for sure. An optional parent window is a great idea...
It's annoying the different behavior of the requesters.
situation; Main window is open on Monitor 2:
InputRequester always opens on main screen while MessageRequester opens on monitor 2.
When the main screen is off, the InputRequester opens on it, very stupid!

My opinion is that the requesters should always open on the monitor where the main window is open!
It would be nice if the behavior could be adjusted.
Re: Improve the input requester
Implemented in 6.10
Re: [Implemented] Improve the input requester
Thanks for the new feature.
Just tried, but....
There must be an additional flag or something I do not know?
Just tried, but....
There must be an additional flag or something I do not know?
Code: Select all
EnableExplicit
Enumeration EWindow 1 ; start with 1 (ZERO can be used for error detecting)
#WINDOW_Main
EndEnumeration
Enumeration EGadget 1 ; start with 1 (ZERO can be used for error detecting)
#GADGET_btnShowMessageRequester
#GADGET_btnShowInpuRequester
#GADGET_btnShowPathRequester
EndEnumeration
#Caption = "Test the new Requester Flags [???] "
Procedure CreateMainWindow()
If OpenWindow(#WINDOW_Main, 40, 40, 280, 120, #Caption, #PB_Window_SystemMenu)
ButtonGadget(#GADGET_btnShowMessageRequester, 8, 24, 160, 24, "Show Message Requesters ")
ButtonGadget(#GADGET_btnShowInpuRequester, 8, 48, 160, 24, "Show Input Requesters ")
ButtonGadget(#GADGET_btnShowPathRequester, 8, 72, 160, 24, "Show Path Requesters ")
EndIf
ProcedureReturn IsWindow(#WINDOW_Main) ; non-zero if valid window
EndProcedure
; --- main function ---------------------------------------------------------
Procedure main()
Protected tempStr.s
If CreateMainWindow()
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Gadget
Select EventGadget()
Case #GADGET_btnShowMessageRequester
MessageRequester(#Caption, "No Parent Window." + #LF$ + "So this works as always.", #PB_MessageRequester_Info)
MessageRequester(#Caption, "With Parent Window." + #LF$ + "So this doesn't work as expected.", #PB_MessageRequester_Error, WindowID(#WINDOW_Main))
Case #GADGET_btnShowInpuRequester
tempStr = InputRequester(#Caption, "no parent window", "", 0)
tempStr = InputRequester(#Caption, "with parent window", "", 0, WindowID(#WINDOW_Main))
Case #GADGET_btnShowPathRequester
PathRequester(#Caption, GetTemporaryDirectory())
PathRequester(#Caption, GetTemporaryDirectory(), WindowID(#WINDOW_Main))
EndSelect
EndSelect
ForEver
EndIf
EndProcedure
End main()
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: [Implemented] Improve the input requester
I updated the code above...
Fun fact: The other requesters show up close to there parent windows without the new parameter!
I am pretty sure we need a small text with a brief description of the new parameters.
TIA.
Fun fact: The other requesters show up close to there parent windows without the new parameter!
Code: Select all
; ColorRequester()
; FontRequester()
; OpenFileRequester()
; SaveFileRequester()
TIA.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).