Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    113

    Limit amount of text in an input object - can it be done?

    Hi is there any way to limit the amount of text someone can enter into an input object to a specific amounnt of characters?

    For example say I had an object and I only wanted a user to put a maximum of 160 letters or numbers in that object then a message would pop up saying that they have exceeded that limit - would that be possible?

    I know I can strip letters from an object left or right - but limiting the amount in the first place is another story?

  2. #2
    Join Date
    Feb 2004
    Posts
    40
    Quote Originally Posted by mrdude View Post
    Hi is there any way to limit the amount of text someone can enter into an input object to a specific amounnt of characters?

    For example say I had an object and I only wanted a user to put a maximum of 160 letters or numbers in that object then a message would pop up saying that they have exceeded that limit - would that be possible?

    I know I can strip letters from an object left or right - but limiting the amount in the first place is another story?

    yes in input settings choose inputmask see help file

  3. #3
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Quote Originally Posted by mrdude View Post
    Hi is there any way to limit the amount of text someone can enter into an input object to a specific amounnt of characters?

    For example say I had an object and I only wanted a user to put a maximum of 160 letters or numbers in that object then a message would pop up saying that they have exceeded that limit - would that be possible?

    I know I can strip letters from an object left or right - but limiting the amount in the first place is another story?
    I think there is a post with better code than this but here's one way. (example limits 5 characters), placed in the On Key event of the input object.

    Code:
    txt = Input.GetText("Input1")
    if String.Length(txt) > 5 then
    	Dialog.Message("", "input > 5")
    	Input.SetText("Input1", String.Left(txt,5))
    end

  4. #4
    Join Date
    Jun 2004
    Posts
    113
    Thanks guys, I will give that a go. Cheers

Similar Threads

  1. is it possible to set text color of input object ?
    By GoOgLe in forum AutoPlay Media Studio 7.5
    Replies: 2
    Last Post: 04-14-2008, 09:51 AM
  2. Grid object text input
    By pjborg in forum AutoPlay Media Studio 7.5 Suggestions
    Replies: 9
    Last Post: 03-19-2008, 06:32 AM
  3. Java to Autoplay. Find text in input object problem
    By dorkauf89 in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 03-10-2008, 07:08 PM
  4. Function: Test Whether An Input Object Is Empty
    By Lorne in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 06-08-2004, 02:18 PM
  5. INFO: Difference between the Media Player Object and the AVI Object
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 02:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts