Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tooltip only showing for less than 1 second
#2
Don't know, here works well.

----

The code can be simplified.

C# code:
// script ""
using System.Windows.Controls;

var b = new wpfBuilder("Window");
b.Options(rightAlignLabels: true);

b.Add("PTP Domain", out TextBox ptpDomain).Tooltip("Integer between 0 and 127");

b.Add("Delay Request", out ComboBox ptpDelayReq).Items("Multicast|Unicast");

b.Add("Control Multicast Address:Port", out TextBox controlMC).Tooltip("Port must 49999");

b.R.AddOkCancel();
if (!b.ShowDialog()) return;

And can validate.

C# code:
// script ""
using System.Windows.Controls;

var b = new wpfBuilder("Window");
b.Options(rightAlignLabels: true);

b.Add("PTP Domain", out TextBox ptpDomain)
    .Tooltip("Integer between 0 and 127")
    .Validation(_ => ptpDomain.Text.ToInt(out int i1) && i1 is >= 0 and <= 127 ? null : "Domain must be integer between 0 and 127");

b.Add("Delay Request", out ComboBox ptpDelayReq).Items("Multicast|Unicast");

b.Add("Control Multicast Address:Port", out TextBox controlMC)
    .Tooltip("Port must 49999")
    .Validation(_ => controlMC.Text.ToInt() is 49999 ? null : "Port must be 49999");

b.R.AddOkCancel();
if (!b.ShowDialog()) return;


Messages In This Thread
RE: Tooltip only showing for less than 1 second - by Gintaras - 06-15-2022, 05:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)