From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Editbox Character Length

Solved!
Go to solution

I would like to limit the character length that can be entered in a dialog editbox, is this possible?

 

Application limit it 6 characters for date format 011214 = 1st Dec 2014

 

Thank You 

0 Kudos
Message 1 of 4
(5,067 Views)

Hi,

 

yes, programmatically with the EventChange-Method 🙂

 

Greetings,

Martin

0 Kudos
Message 2 of 4
(5,061 Views)

Hi Martin

 

Great news. I am new to using Dialog Editor, and unfamiliar with EventChange, could you expand upon how I would configure it?


Thanks

0 Kudos
Message 3 of 4
(5,055 Views)
Solution
Accepted by Soton14

Hi,

 

it should look somehow like this:

 

Sub EditBox1_EventChange(ByRef This) 'Erzeugter Event-Handler

  If (Len(This.Text) > 6) Then
    This.Text = Left(This.Text, 6)
  End If
End Sub

 

Message 4 of 4
(5,051 Views)