Table of Contents

TaskDialog

Informationen

  • Kategorien: GUI
  • Version: 16.0.0.4705
  • Veröffentlichungsdatum: Montag, 11. März 2013
  • Entwickler: Wauerausgeschieden
  • Benötigt Datenbankänderung: Nein
  • Betreff: Erweiterte Form der MessageBox

Beschreibung

Mit dem unter Windows Vista eingeführten TaskDialog, wird ein neues Dialogfenster bereitgestellt, welches über folgende Funktionen konfigurierbar ist:

TaskDlg_Create erzeugt einen neuen TaskDialog. TaskDlg_Create( «string $sWindowTitle», «string $sMainInstruction», «string $sContent», «string $sFooter», «string $sCollapsedText»,«string $sExpandedText», «string $sExpandedInfo», «string $sVerificationBoxText, «int $bSetVerifyCheckState», [«int $nInputBox», «string $sInputBoxText»] )

TaskDlg_AddButton erzeugt einen benutzerdefinierten Button. TaskDlg_AddButton( «string $sButtonText», «int $nButtonId», «int $bEnableCommandLink»,
«int $bShowIcon» [, «int $bIsDefaultButton»] )

TaskDlg_AddRadioButton erzeugt einen benutzerdefinierten Radiobutton. TaskDlg_AddRadioButton( «string $sButtonText», «int $nButtonId» [, «int $bIsDefaultButton»] )

TaskDlg_SetStandardButtons erzeugt einen vordefinierten Standardbutton. TaskDlg_SetStandardButtons( «int $iFlags» | [«int $bOk», «int $bYes», «int $bNo», «int $bChancel», «int $bRetry», «int $bClose»] )

TaskDlg_SetIcons ermöglicht das Setzen eines Icons im Taskdialog, sowie in dessen Fußzeile. TaskDlg_SetIcons( «int $nMainIcon» | «string $sMainIconPath» [, «int $nFooterIcon» | «string $sFooterIconPath» ]

TaskDlg_Show zeigt den Taskdialog an. Falls ein Buttons gedrückt wurde, wird dessen ID zurückgegeben, anderenfalls -1. TaskDlg_Show( «byref int $nRadioButtonId», «byref string $sInputText»,
«byref int $bIsVerificationChecked» )

Bilder

TaskDialog

Beispielcode

oncallfunction
{
	var int $nButtonId;
	var int $nRadioButtonId;
	var int $bIsVerificationChecked;
	var string $sInputBox;
	
	TaskDlg_Create( "Warnung","Es ist ein Problem aufgetreten", "An dieser Stelle befindet sich der Content",                                             "Es gibt auch eine Fußzeile...", "Details ", "Details ausblenden", 
                                           "Hier dazu ein paar detaillierte Informationen",  "Auswählen", 1, 1, "pit - cup");
	TaskDlg_AddButton( "&Das ist eine Auswahlmöglichkeit" , 1001, 1, 1 );
	TaskDlg_AddButton( "&Hier die Nächste", 1002, 1, 1 );
	TaskDlg_AddButton( "&Und eine Dritte \nmit etwas mehr Text", 1003, 1, 1, 1 );
	TaskDlg_SetStandardButtons(3); //YESNOCANCEL
	TaskDlg_AddRadioButton( "Ja", 1004 );
	TaskDlg_AddRadioButton( "Nein", 1005, 1 );
	TaskDlg_AddRadioButton( "Vielleicht", 1006 );
	TaskDlg_SetIcons( 1, "X:\\FM\\Images\\Image 32x32\\iconex_aplication_basics\\about.bmp" );  
               //Übergabeparameter als Referenz
	$nButtonId = TaskDlg_Show( $nRadioButtonId, $sInputBox, $bIsVerificationChecked ); 

	//$sInputBox = "pit - cup";
	//$nRadioButtonId = 1005
	//$bIsVerificationChecked = 1;

	if ( $nButtonId == 1001 )
	{
		//Anweisung
	}
	if ( $nButtonId == 1 ) //OK - Standardbutton-Id
	{
		//Anweisung
	}
	//...
}