Hi Chris,
If you click the Font property then it pop ups the Font selector window with the current control set font eg: "Segoe UI", 24.0 but if you press "Cancel" then the control takes "Microsoft Sans Serif, 8.25". It shouldn't change my current control font because I pressed "cancel".
Escaping the Font Selector window
Re: Escaping the Font Selector window
Hi Irwin,
Pressing "Cancel" in this case is the way to set the property back to "Auto", so it does not set the font explicitly to something, it just let's windows decide. I know, this is not a good way of doing it, bun couldn't find a better way to specify "Auto" for font properties...
Pressing "Cancel" in this case is the way to set the property back to "Auto", so it does not set the font explicitly to something, it just let's windows decide. I know, this is not a good way of doing it, bun couldn't find a better way to specify "Auto" for font properties...
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Escaping the Font Selector window
Hi Chris, no problem then. I'll get use to click "Accept" even when nothing has changedChris wrote: Fri Dec 27, 2024 12:50 pm Hi Irwin,
Pressing "Cancel" in this case is the way to set the property back to "Auto", so it does not set the font explicitly to something, it just let's windows decide. I know, this is not a good way of doing it, bun couldn't find a better way to specify "Auto" for font properties...
Re: Escaping the Font Selector window
Hi Irwin,
I was actually hoping you might have an idea on how to implement it in a better wayIrwin wrote: Fri Dec 27, 2024 1:14 pmHi Chris, no problem then. I'll get use to click "Accept" even when nothing has changedChris wrote: Fri Dec 27, 2024 12:50 pm Hi Irwin,
Pressing "Cancel" in this case is the way to set the property back to "Auto", so it does not set the font explicitly to something, it just let's windows decide. I know, this is not a good way of doing it, bun couldn't find a better way to specify "Auto" for font properties...
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Escaping the Font Selector window
Maybe you could save the current control (or controls) in a collection and if the user press "Cancel" set the old font settings to the selected controls but I don't know if that could be possible.Chris wrote: Fri Dec 27, 2024 1:20 pm Hi Irwin,
I was actually hoping you might have an idea on how to implement it in a better wayIrwin wrote: Fri Dec 27, 2024 1:14 pmHi Chris, no problem then. I'll get use to click "Accept" even when nothing has changedChris wrote: Fri Dec 27, 2024 12:50 pm Hi Irwin,
Pressing "Cancel" in this case is the way to set the property back to "Auto", so it does not set the font explicitly to something, it just let's windows decide. I know, this is not a good way of doing it, bun couldn't find a better way to specify "Auto" for font properties...
Re: Escaping the Font Selector window
Hi Irwin,
I mean a different for the user way to select "Auto". Ideal would be to add an "Auto" button in the font selection dialog itself...Will give this some research to see if it is possible..
I mean a different for the user way to select "Auto". Ideal would be to add an "Auto" button in the font selection dialog itself...Will give this some research to see if it is possible..
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 98
- Joined: Tue Mar 01, 2016 11:50 am
- Location: Germany
Re: Escaping the Font Selector window
Hi Irwin,
do you check the Return-Value of the Show()-Method?
From the VO-Help:
StandardFontDialog:Show() Method
Purpose
Display a standard font dialog. To retrieve the value that the user selected, use the StandardFontDialog:Font access.
Syntax
<oStandardFontDialog>:Show() ---> LOGIC
Returns
TRUE if user chooses a font, FALSE if the user presses CANCEL.
...not checked....
HTH
Gerhard
do you check the Return-Value of the Show()-Method?
From the VO-Help:
StandardFontDialog:Show() Method
Purpose
Display a standard font dialog. To retrieve the value that the user selected, use the StandardFontDialog:Font access.
Syntax
<oStandardFontDialog>:Show() ---> LOGIC
Returns
TRUE if user chooses a font, FALSE if the user presses CANCEL.
...not checked....
HTH
Gerhard
Re: Escaping the Font Selector window
Hi Gerhard,
This problem is an issue in how the form designer itself works in XIDE, there is currently no other way for the developer to explicitly set a font property to "Auto" while designing a window. So XIDE at the moment uses the action of closing/canceling the font dialog without pressing OK for setting the property to Auto. When he/she presses OK, then the new font is applied to the options.
Need to find a way for the user to specify 3 possible things, 1) Set the font property to the newly selected font, 2) Set it to <Auto>, 3) Cancel any change to the previously selected option.
This problem is an issue in how the form designer itself works in XIDE, there is currently no other way for the developer to explicitly set a font property to "Auto" while designing a window. So XIDE at the moment uses the action of closing/canceling the font dialog without pressing OK for setting the property to Auto. When he/she presses OK, then the new font is applied to the options.
Need to find a way for the user to specify 3 possible things, 1) Set the font property to the newly selected font, 2) Set it to <Auto>, 3) Cancel any change to the previously selected option.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Escaping the Font Selector window
Chris,
possibly you could inject "<Auto>" to the fontlist?
possibly you could inject "<Auto>" to the fontlist?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Re: Escaping the Font Selector window
Hi Karl,
Unfortunately I can't find a way to adjust anything in the controls of the FontDialog. Maybe only by using WinAPI direct calls to manipulate the dialog, but that's too risky as it can differently in various OS versions. Maybe it's just better to add a small clickable "A" button on the right hand side of the Properties window, when a font property is the selected one.
Unfortunately I can't find a way to adjust anything in the controls of the FontDialog. Maybe only by using WinAPI direct calls to manipulate the dialog, but that's too risky as it can differently in various OS versions. Maybe it's just better to add a small clickable "A" button on the right hand side of the Properties window, when a font property is the selected one.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu