Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StyledTaskDialog Issue: #62

Open
ijbranch opened this issue Nov 7, 2024 · 12 comments
Open

StyledTaskDialog Issue: #62

ijbranch opened this issue Nov 7, 2024 · 12 comments

Comments

@ijbranch
Copy link

ijbranch commented Nov 7, 2024

Win 11, D12.2 p1, 4k monitor, 32bit App, DPI Unaware.
I have added vcl.StyledTaskDialogFormUnit to the Project .dpr, and am experimenting still with StyledTaskDialog component added to the project unit.
I have added 4 CommandLink buttons.
When I run the App and call the dialog, it puts it at the top left of the screen and there doesn't appear to be able to tell it I want it to appear at screen center.
image

Have I missed something??

@carloBarazzetta
Copy link
Contributor

carloBarazzetta commented Nov 7, 2024

Probably is a bug: please give me a zip with your test project, so I can debug and fix it...
but.. the Dialog in the image is a "standard" Delphi Dialog, not my StyledDialog... Give me the sources so I can check it!

@ijbranch
Copy link
Author

ijbranch commented Nov 7, 2024

Here you go.
Project21.zip
I'm surprised you don't support .rar files...

@carloBarazzetta
Copy link
Contributor

carloBarazzetta commented Nov 8, 2024

Try with version 3.7.3 and give me your feedback.

@ijbranch
Copy link
Author

ijbranch commented Nov 8, 2024

Ahhh. That's better:
image
Thank you.

@ijbranch
Copy link
Author

ijbranch commented Nov 9, 2024

What parameter will change the CommandLink Buttons width?
I tried 'ButtonsWidth' but it didn't make any difference. I'm guessing that is for the standard dialog buttons?
image
I'd like to reduce the dialog width to that of the 'Note:'

Also, I'd like to be able to turn these off:
image
It would also be nice to have a Question Mark icon option. I know it is no longer 'standard' but it conveys the intent better than an excliamation mark in many cases.

@carloBarazzetta
Copy link
Contributor

I'm working to add a specific value tdiQuestion for MainIcon and FooterIcon properties of TStyledTaskDialog.
ButtonsWidths only affect the normal buttons at the bottom of the Dialog.
Actually the with of a Button using CommandLink is alway the width of the Dialog Form.
Maybe in future I can add a HideCloseButton property to my TStyledDialog... now works as standard TaskDialog.

@ijbranch
Copy link
Author

ijbranch commented Nov 9, 2024

Hi Carlo
Tks.
>> Actually the width of a Button using CommandLink is always the width of the Dialog Form.
But there is no property to adjust the width of the dialog.
Ian

@ijbranch
Copy link
Author

ijbranch commented Nov 9, 2024

The ButtonWidth property only affects the 'CommonButtons', not the 'Buttons'.
With ButtonWidth set to 120 I see this:
image
Note, only the CommonButton 'Cancel' has the 120 width.
It would also be nice to be able to and an icon/image to the buttons, aka TBitBtn style.

@carloBarazzetta
Copy link
Contributor

This is a bug...
For other customizations of Styled dialog you can customize the "GUI" form by yourself: notice that there is a base form Vcl.StyledTaskDialogFormUnit.pas that contains the logic of building the form and two other forms that inherits from this:

  • Vcl.StyledTaskDialogStdUnit (for non animated dialog) that contains only the logic for the icons, using an ImageList
  • Skia.Vcl.StyledTaskDialogAnimatedUnit (for animated dialog using Skia4Delphi) that contains the logic for the animated icons using SkAnimatedImage.
    You can inherits from TStyledTaskDialogStd form and customize your form as you want, adding icons to every buttons, : remember to register your form using:
    RegisterTaskDialogFormClass(TMyStyledTaskDialogStd);
    It is possible that in future I can add some other feature to the form controlled by the StyledTaslDialog component...

@ijbranch
Copy link
Author

Cheers.

@carloBarazzetta
Copy link
Contributor

In 3.7.4 version you can find:

  • Added tdiQuestion value to show a Question mark in TaskDialog
  • Use Question Mark (icon ora animation) for MessageDlg and TaskDialog of mtConfirmation type
  • Fixed DefaultButton for StyledDialog using MessageDlg and TaskDialog

@ijbranch
Copy link
Author

Hi Carlo,
Excellent! Thank you.
The only thing I would wish for now is a Width property fo the dialog... ;-)

Regards & Tks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants