Aldo Calpini wrote:

I found an easier way ;-)
this will limit your textfield to 8 chars:

    $W->BeginDate->SendMessage(197, 8, 0);

197 stands for EM_SETLIMITTEXT.
to know how many characters you've limited, use:

    $limit = $W->BeginDate->SendMessage(213, 0, 0);

That is good to know because the next question was going
to be how do you for example limit a textfield to 20 characters
when there is only room on the screen to place a texfield
big enough to hold 15 characters?  You can't use

   -style => WS_VISIBLE, WS_TABSTOP

since that will stop the cursor from scrolling right past the
15th character position.  
  
Example:

           1-15                  16-20
[ABCDEFGHIJKLMNO] PQRST 
          textfield

# End


Reply via email to