Write TSL functions for the following interactive modes: i. Creating a dialog box with any message you specify, and an edit field. ii. Create dialog box with list of items and message. iii. Create dialog box with edit field, check box, and execute button, and a cancel button. iv. Creating a browse dialog box from which user selects a file. v. Create a dialog box with two edit fields, one for login and another for password input.

Showing Answers 1 - 1 of 1 Answers

R.J

  • Apr 28th, 2005
 

Answers: 
1. Dialog box with any message, and edit field 
create_input_dialog ( message ); 
message - Any expression.  
This expression will appear in the dialog box as a single line. 
Return Values - This function returns a string. If no string is found or if the Cancel button is pressed within the dialog box, then the function returns NULL. 
 
2. Dialog box with list of items and message 
create_list_dialog ( title, message, item_list ); 
title - The expression that appears in the banner of the dialog 
box. 
message - The message for the user. 
item_list - The items that make up the list, separated by commas. 
Return Values - This function returns a string. If no string is found or if the Cancel button is pressed within the dialog box, then this function returns NULL. 
 
3. Dialog box with edit filed, check box, excute button,cancel button - basically a custom dialog box 
create_custom_dialog ( function_name, title, button_name, edit_name1 [ , edit_name2, check_name1 [ , check_name2 ] ] ); 
function_name - The name of the function that is executed when you press the "execute" button. 
title - An expression that appears in the window banner of the 
dialog box. 
button_name - The label that will appear on the "execute" button. You press this button to execute the contained function. 
edit_name The labels of the edit box(es) of the dialog box. Multiple edit box labels are separated by commas, and all the labels together are considered a single string. If the dialog box 
has no edit boxes, this parameter must be an empty string 
(empty quotation marks). 
check_name - Contains the labels of the check boxes in the dialog box. Multiple check box labels are separated by commas, and all the labels together are considered a single string. If the 
dialog box has no check boxes, this parameter must be an 
empty string (empty quotation marks). 
Return Values - This function returns a string representing the return value of the function executed when the Execute button is clicked and an empty string is returned when the Cancel button is clicked. 
 
4. Browse dialog box from which user selects a file. 
create_browse_file_dialog ( filter1 [ ; filter2; filter3; ...filtern ] ); 
filter - Sets one or more filters for the files to display in the browse dialog box. You must use wildcards to display all files (*.*) or only selected files (*.exe or *.txt, etc.), even if an exact match exists. Multiple files are separated by semicolons and all the filters together are considered a single string. 
Return Values - This function returns a string representing the label of the selected file. 
 
5. Dialog box with 2 edit fields, one for login, another for password 
Use Custom dialog box as in 3.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions