Skip to content

Xojo example project: Task Dialogs

License

Notifications You must be signed in to change notification settings

jo-tools/taskdialogs

Repository files navigation

Task Dialogs

Xojo example project

License: MIT

Description

This Xojo example project shows to use the Task Dialog Indirect API for Windows Desktop Applications.
It provides a couple of convenience Methods for the most often used Task Dialogs (1 or 2 options to choose, (dis)allow cancel). The Advanced Dialog lets you explore all the settings.
It falls back to Xojo's MessageBox or MessageDialog for other Build Targets (macOS, Linux).

Also provided are convenience methods for often used MessageBoxes, which use the Task Dialog API if available, and otherwise fallback to Xojo's standard MessageBox.

Note

Xojo 2021r3 (and newer) supports DarkMode for TargetWindows. However, Microsoft doesn't support DarkMode in the Task Dialog API's. So don't be surprised if they always show in a light appearance.

ScreenShots

Example 1:
ScreenShot: Example 1

Example 2:
ScreenShot: Example 2

Example 3:
ScreenShot: Example 3

Xojo

Requirements

Xojo is a rapid application development for Desktop, Web, Mobile & Raspberry Pi.

The Desktop application Xojo example project TaskDialogs.xojo_project is using:

  • Xojo 2018r4
  • API 1

How to use in your own Xojo project?

  1. Copy and paste the folder taskdialogs (containing 3 Classes and 2 Modules) to your project.
  2. Have a look at how the example projects is using the provided Methods. One example:
    Dim bAllowCancel As Boolean = true
    select case TaskDialog_TwoOptions("Title", MsgBoxIcon.Question, "Text", "Explanation", "Action 1", "Action 2", true, self.TrueWindow)
        case 1 'Action 1
        break
    case 2 'Action 2
        break
    else 'Cancel
        break
    end select
    

About

Juerg Otter is a long term user of Xojo and working for CM Informatik AG. Their Application CMI LehrerOffice is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some bits and pieces for Xojo Developers.

Contact

E-Mail    Follow on Facebook    Follow on Twitter

Donation

Do you like this project? Does it help you? Has it saved you time and money?
You're welcome - it's free... If you want to say thanks I'd appreciate a message or a small donation via PayPal.

PayPal Dontation to jotools