Alpha Video Training
Results 1 to 11 of 11

Thread: Text Box - Input Width

  1. #1
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Text Box - Input Width


    When a textbox is used on a form for a variable, the user is able to enter a string that's longer than the display width of the textbox itself. Would be very nice to be able to set the input width to match the display width in such a way that the user would be unable to continue typing once the limit is reached. -- tom

  2. #2
    Member
    Real Name
    Jack Wheeler
    Join Date
    Apr 2000
    Posts
    570

    Default RE: Text Box - Input Width

    Hi Tom,
    I have not been well, therefore, I am just starting back with A5W. I remember that using alpha you can write to an htlm page with the "?" symbol. Using this the text attribute in htlm can set the size of the text. This I believe is what you have to do. WAS tries to work with all platforms, figuring this out and utilizing as many languages as possible beings forth a better developer for Alpha. Jack

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Text Box - Input Width

    Wasn't talking about WAS. (sorry about that).

    The problem is simple.

    Define a layout variable. Drag it to your form.

    Try to limit the width of the input string typed by the user so that inputs stop automatically when the limit is reached.

    I haven't been able to figure out how to do it. So it's on my wishlist.

    -- tom

  4. #4
    VAR John Oesterle's Avatar
    Real Name
    John Oesterle
    Join Date
    Apr 2000
    Location
    Midwest
    Posts
    236

    Default RE: Text Box - Input Width

    Tom -

    I haven't found a way to limit input either, and a new client is complaining about it. All I can do is apply a length test and send the user back to correct the entry...sorta clunky.

    - John

  5. #5
    "Certified" Alphaholic Melvin Davidson's Avatar
    Real Name
    Melvin Davidson
    Join Date
    Apr 2000
    Location
    Parker, CO
    Posts
    1,197

    Default RE: Text Box - Input Width

    One way to limit would be to use the OnKey event and code

    if len(field_name.text) " max_value
    ...take action needed..
    end if

    Granted, you would have to code for a lot of field, but hey,
    it's just an idea. :)

  6. #6
    Member
    Real Name
    Don Ervin
    Join Date
    Mar 2006
    Location
    Midland,Texas
    Posts
    3

    Default Re: Text Box - Input Width

    Quote Originally Posted by Tom Cone Jr View Post
    Wasn't talking about WAS. (sorry about that).

    The problem is simple.

    Define a layout variable. Drag it to your form.

    Try to limit the width of the input string typed by the user so that inputs stop automatically when the limit is reached.

    I haven't been able to figure out how to do it. So it's on my wishlist.

    -- tom
    Does anyone know if this rudimentary ability has been added yet? I had to abandon Alpha 5 on a project because it lacked this simple capability.

    Don

  7. #7
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Text Box - Input Width

    Don,

    A simple test tells me that this has still not been incorporated...but to give up on a tool for a shortcoming that has such a simple fix as Melvin pointed to must mean you have 100's or 1000's of such fields needing this---in which case a batch file most likely could have been written similar to the one for stylesheets that could change all fields...or even possibly one of Cal Locklin's AIMs Addons would aid in such an endeavor. I just know that script can be changed with xbasic (from a button for instance) for various events so such a solution would be possible.

    Am curious as am unfamiliar with other tools...you say it is a rudimentary ability---this I take it to mean most, if not all other, tools such as Access, Filemaker, Clarion, etc have this (without coding)??
    Last edited by MikeC; 03-13-2008 at 02:36 AM.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  8. #8
    Member
    Real Name
    Don Ervin
    Join Date
    Mar 2006
    Location
    Midland,Texas
    Posts
    3

    Default Re: Text Box - Input Width

    Mike,

    Thanks for replying so quickly. Yes, the application was an accounting / record-keeping program 2-3 years ago that needed limits on a lot of text input fields. I have since used Alpha 5 for a small inventory application, and it worked out well. But on the other project I couldn't figure out how to limit the user input.

    The reason why I say that is a basic function is because it has always been there in the past in other languages. I used dBase IV alot back when I programmed , and it has this built-in (so then FoxPro does). And my rookie job way-WAY-back-when was programming Cado Systems small business computers (Cadol had this built-in as well).

    Although I spend 98% of my time now in accounting and not programming, on occasion the need arises for a custom routine for some task at work. And I still get asked by past associates if I can write some program for them. I would still use Alpha 5 - I really like it. I'm pleased to see the constant improvements that are made & new features added all the time. Just wish I had enough time to really learn how to use it ...

    Don

  9. #9
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Text Box - Input Width

    Don, you may know this already, but the text boxes that are bound to table fields function as you desire. It's only the text boxes that are bound to character variables that require a bit of extra work. -- tom

  10. #10
    Member
    Real Name
    Don Ervin
    Join Date
    Mar 2006
    Location
    Midland,Texas
    Posts
    3

    Default Re: Text Box - Input Width

    Tom,

    Thanks for the reply. I was trying to do an exotic application, with my own scrolling schemes, etc. , in other words, trying to have more control over how the application functioned. So I was heavy into variables.

    I think next time I will study the built-in features of Alpha 5 more before I do any hard-coding . I know there are alot of time-saving functions, and alot has been added since I had the pleasure of spending quality time using A5.

    Don

  11. #11
    Member
    Real Name
    Dan Hooley
    Join Date
    Jan 2008
    Location
    Washington (State)
    Posts
    343

    Default Re: Text Box - Input Width

    Quote Originally Posted by Tom Cone Jr View Post
    When a textbox is used on a form for a variable, the user is able to enter a string that's longer than the display width of the textbox itself. Would be very nice to be able to set the input width to match the display width in such a way that the user would be unable to continue typing once the limit is reached. -- tom
    Also...

    Would be great if they would add the ability to enter "hard" returns and limit the number of rows to the height of the text box. That way when the user would press enter in a text box (sized appropriately), they would go to a new line in the same field, instead of going to the next field, until the height of the box was reached, then advance to the next field. Maybe someone knows how to do this already...

    Thanks, Dan

Similar Threads

  1. Row Selector Width
    By Sam Wagoner in forum Alpha Five Version 5
    Replies: 5
    Last Post: 07-11-2005, 11:53 AM
  2. Text Area not accepting input
    By Andrew Hastings in forum Web Application Server v6
    Replies: 2
    Last Post: 12-16-2004, 06:00 AM
  3. Importing fixed width text question...
    By Jason Fowler in forum Alpha Five Version 5
    Replies: 2
    Last Post: 01-13-2004, 10:55 AM
  4. Change width of text box
    By John Taylor in forum Alpha Five Version 5
    Replies: 4
    Last Post: 11-03-2003, 01:29 PM
  5. Tab width
    By Bill@TrackerSystems.com in forum Alpha Five Version 5
    Replies: 7
    Last Post: 09-29-2003, 03:14 AM

Bookmarks

Posting Permissions

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