Defines the text of the button.
Class: SftTaskDialogButton
Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET
public string Text { get; set; }
Public Property Text As StringThe text; an ampersand marks the mnemonic. A standard button has the text Windows gives it, in the language of Windows; setting it throws an InvalidOperationException. The text cannot be changed while the page is shown.
Defines the text of the button.
Verification = new SftTaskDialogVerificationCheckBox("&Do not ask again"),
Expander = new SftTaskDialogExpander("Order 1042, Order 1044 and Order 1045 have changes that are not saved."),
Footnote = new SftTaskDialogFootnote("Drafts are kept for 30 days."),
};
page.Buttons.Add(new SftTaskDialogCommandLinkButton("&Save the orders", "They are saved as drafts and can be completed later."));
page.Buttons.Add(new SftTaskDialogCommandLinkButton("D&iscard the orders", "The changes are lost."));
page.Buttons.Add(SftTaskDialogButton.Cancel);
SftTaskDialogButton clicked = SftTaskDialog.ShowDialog(this, page);
labelResult.Text = "Task dialog: " + (clicked == null ? "closed" : clicked.Text.Replace("&", "")) + (page.Verification.Checked ? ", do not ask again" : "");
}
private void buttonColorDialog_Click(object sender, EventArgs e) {
sftColorDialog1.Color = panelColor.BackColor;
if (sftColorDialog1.ShowDialog(this) == DialogResult.OK) {
panelColor.BackColor = sftColorDialog1.Color;
labelResult.Text = "Color dialog: " + sftColorDialog1.Color.Name;
page.Expander = New SftTaskDialogExpander("Order 1042, Order 1044 and Order 1045 have changes that are not saved.")
page.Footnote = New SftTaskDialogFootnote("Drafts are kept for 30 days.")
page.Buttons.Add(New SftTaskDialogCommandLinkButton("&Save the orders", "They are saved as drafts and can be completed later."))
page.Buttons.Add(New SftTaskDialogCommandLinkButton("D&iscard the orders", "The changes are lost."))
page.Buttons.Add(SftTaskDialogButton.Cancel)
Dim clicked As SftTaskDialogButton = SftTaskDialog.ShowDialog(Me, page)
Dim text As String = "closed"
If clicked IsNot Nothing Then
text = clicked.Text.Replace("&", "")
End If
If page.Verification.Checked Then
text += ", do not ask again"
End If
LabelResult.Text = "Task dialog: " + text
End Sub
See Also SftTaskDialogButton Class | Classes | SftStyle/NET 3.0