Entry dialog for a text
Entry dialog for a text
Name | Type | Default | Description |
Return | int | != 0 Okay, 0 Cancel | |
str | String or char* | - | When opening, the passsed text will be assumed by the entry field of the dialog. After Okay the text is given the content of the entry field. In the case of Parametertype char * the parameter must be a variable that is large enough to accommodate the expected result. |
label | String or char* | - | Short caption of the entry field |
title | String or char* | "Frage" | Window title |
okay | String or char* | "Okay" | Caption of the Okay button |
cancel | String or char* | "Abbrechen" | Caption of the Cancel button |
multiline | int | 1 | Is the edit field of the dialog to contain several lines? If the field can contain several lines, Return will be considered to text characteristics and the dialog may only be ended by a mouse-click. Otherwise the dialog can be confirmed with Return. |
maxchars | int | 0 | max. input length (str must allocated with 1 byte more for the closing 0 at least!) |
int main () { char str[2048];
strcpy (str, "Little Red Riding Hood"); askstring (str, "Fairy story time", "Grimm", "Yes", "No");
String instead of char *
int main() { String str = string::alloc("Rötkäppchen"); String label = string::alloc("Märchenstunde"); String title = string::alloc("Grimmig"); String yes = string::alloc("Ja"); String no = string::alloc("Nein");
askstring (str, label, title, yes, no);
showmessage(str);
string::release(str); string::release(label); string::release(title); string::release(yes); string::release(no); }
Alphabetic index HTML hierarchy of classes or Java