LCL implementation puts command buttons above radiobuttons, native Windows implementaiton does the opposite.Can't confirm what you are saying about command buttons above radiobuttons:
Can't confirm what you are saying about command buttons above radiobuttons:
Same as with Delphi.
Depends on native Windows:Whatever combination of flags I use in the LCL TaskDialog, the command links never are above the radiobuttons, in the code that I posted above. I don't understand how a screenshot such as in reply #1 could have been achieved. Is it the Windows version? I am on Win 11...
Flags := [tfUseHiconMain,tfAllowDialogCancellation,tfUseCommandLinks]
vs
Flags := [tfAllowDialogCancellation,tfUseCommandLinks]
similar tfUseCommandLinksNoIcon
I am completely lost... You say: "LCL implementation puts command buttons above radiobuttons, native Windows implementation does the opposite." My test shows: No - the command buttons are below the radiobuttons which is like native Windows, according to your statement. Why should I have to patch anything then?
I still wonder why you were able to see this on Windows. Your screenshot does not look like you're on XP.
Actually on Windows, the button can be above or below:As I already wrote above I cannot verify this: When I use these Flags settings in my test procedure from reply #3 nothing changes with respect to arrangement of radio and command buttons. But maybe I am missing some point. Can you post some code so that I can reproduce your observation?
Flags := [tfUseHiconMain,tfAllowDialogCancellation,tfUseCommandLinks]
vs
Flags := [tfAllowDialogCancellation,tfUseCommandLinks]
Strangely tfUseHiconMain affects their location and style
Ah, now I understand what he means...I still wonder why you were able to see this on Windows. Your screenshot does not look like you're on XP.
Because Arioch forced the LCL to use the emulation code instead of the Vista+ dialog.
Strangely tfUseHiconMain affects their location and style
selecting the color of the text by background
and the background by the text.
The answer is from another topic, about colors.The system colors usually come in pairs such as clWindow - clWindowText, clHighlight - clHighlightText, clInfoBk - clInfoText. Unfortunately for some colors it is hard to decide whether they are used as background or foreground color (at least without some work). But anyway, Arioch's hint on clHotLight (why didn't they call it clHotText if it used for hyperlinks?) is an interesting tip: zamtmn, could you check whether this could serve in dark mode as a replacement for the $B00000 in the original code?
I think that we need some kind of centralized method of selecting the color of the text by background and the background by the text. So that the result is somehow similar to the system colors. It will not be possible to just do with clXXXX constants, there will always be "bad" color themes
of course, there just became too many topics and textThe answer is from another topic, about colors.The system colors usually come in pairs such as clWindow - clWindowText, clHighlight - clHighlightText, clInfoBk - clInfoText. Unfortunately for some colors it is hard to decide whether they are used as background or foreground color (at least without some work). But anyway, Arioch's hint on clHotLight (why didn't they call it clHotText if it used for hyperlinks?) is an interesting tip: zamtmn, could you check whether this could serve in dark mode as a replacement for the $B00000 in the original code?
I think that we need some kind of centralized method of selecting the color of the text by background and the background by the text. So that the result is somehow similar to the system colors. It will not be possible to just do with clXXXX constants, there will always be "bad" color themes
The system colors usually come in pairs such as clWindow - clWindowText, clHighlight - clHighlightText, clInfoBk - clInfoText.
zamtmn, could you check whether this could serve in dark mode as a replacement for the $B00000 in the original code?No so good... I played a bit with the themes on my Linux-VM and found clHighlight to be fine in all cases that I visited. However, I don't have access to qt/qt5 ATM. zamtmn, would you be so kind to check this color, too?
...in this themeAnd the green bitmap arrows, BTW, have the same issue...
but chances are in the hundreds of themes floating around there would be those where clHighlight would not be good choice :-(
in the end, we are doing guesswork after looking at some few (1 or 20 or maybe 10, hardly more) of selected themes
P.S. ...andthen there are also GTK2 and GTK3 with their own themes
It seems Microsoft Win7 TaskDialog has some rather narrow constraints upon the dialog width.
It varies, but in some very strict margins. i'd estimate width varyation 20-40%
TDF_SIZE_TO_CONTENT
Indicates that the width of the task dialog is determined by the width of its content area. This flag is ignored if cxWidth is not set to 0.
cxWidth
Type: UINT
The width of the task dialog's client area, in dialog units. If 0, the task dialog manager will calculate the ideal width.
About DLUs: In unmanaged code, the system measures the placement of controls on a surface in dialog units (DLUs), not pixels. A dialog unit is the device-independent measure to use for layout. One horizontal dialog unit is equal to one-fourth of the average character width for the current system font. One vertical dialog unit is equal to one-eighth of an average character height for the current system font. The default height for most single-line controls is 14 DLUs. Be careful if you use a pixel-based drawing program, because it might not provide an accurate representation when you translate your design into dialog units. If you do use a pixel-based drawing tool, you may want to take screen snapshots from a development tool that supports dialog units and use those images. Your application can retrieve the number of pixels per base unit for the current display by using the GetDialogBaseUnits function.
TDF_SIZE_TO_CONTENT
3. Notice, how part of Caption was "downgraded" to the Hint. It seems like either inside Windows ComCtl or inside VCL both caption and hint are merged into "array of string", then first string is considered the caption, and all the rest - multi-line hint.
When using Command Links, you delineate the command from the note by placing a new line character in the string.