12-12-2019, 05:08 PM
If F2 does not start renaming, possible reasons are:
The list control is not focused.
F2 is assigned to a menu item.
F2 is used as a global hotkey in some app. For example a trigger.
Again errors in example code. Correct codes:
The list control is not focused.
F2 is assigned to a menu item.
F2 is used as a global hotkey in some app. For example a trigger.
Again errors in example code. Correct codes:
C# code:
ADialog.ShowTextInputEx("Example", flags: DFlags.CommandLinks, buttons: "OK|Cancel|10 Browse\nSets edit control text.",
onButtonClick: e => { if(e.Button == 10) { e.EditText = "text"; e.DontCloseDialog = true; } });
ADialog.ShowTextInputEx("Example", "Try to click OK while text is empty.", onButtonClick: e =>
{
if(e.Button == 1 && Empty(e.EditText)) {
ADialog.Show("Text cannot be empty.", owner: e.hwnd);
e.dialog.EditControl.Focus();
e.DontCloseDialog = true;
}
});
C# code:
var d = ADialog.ShowNoWaitEx("Another example", "text", "1 OK|2 Cancel", y: -1, secondsTimeout: 30);
2.s(); //do something while the dialog is open
d.Send.ChangeText2("new text", false);
2.s(); //do something while the dialog is open
d.ThreadWaitForClosed(); Print(d.Result); //wait until the dialog is closed and get result. Optional, just an example.