Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Field Lenth

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Field Lenth

    I have a dialog/UX table with a text field that is 120 characters. I need this field to wrap around to a second line after 60 characters. Can anyone assist me in how to make this field wrap around. I know two separate fields is much easier but I do need this to be one long field if possible with it wrapping around after 60 characters. Also I tried using a TEXTAREA field but I couldn't place a character limit on it for 120 characters.
    Last edited by BillWFG; 08-07-2013, 11:37 AM.

    #2
    Re: Field Lenth

    You can play with the onkeyup event of your textarea control & this code (needs further refining but it gives you the idea). You well end up with a crlf() though in your data that you may want to filter out before saving. There may be other options too.

    Code:
    var msg = {dialog.Object}.getValue('TEXTAREA1');
    if (msg.length == 60){
    msg = msg.substring(0,60)+'\r\n';
    {dialog.Object}.setValue('TEXTAREA1',msg);
    }
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

    Comment


      #3
      Re: Field Lenth

      It's hard to believe that A5anywhere doesn't have anyway to wrap a textbox length. I'll review your code and do my best to use it.

      Comment


        #4
        Re: Field Lenth

        I added your code to the onKeyup just as I copied it but it didn't limit me to 60 or 120 chr. What do you think I should try?

        Comment


          #5
          Re: Field Lenth

          Correct, I only wrote some sample code for you to create the wrap (break)

          Add this:

          Code:
          if (msg.length > 61){
          msg = msg.substring(0,61);
          {dialog.Object}.setValue('TEXTAREA1',msg);
          }
          Frank

          Tell me and I'll forget; show me and I may remember; involve me and I'll understand

          Comment


            #6
            Re: Field Lenth

            LOL...I'm such a jerk. I was using your code as a copy and past. I'll learn in time. I'm so new at this but I've been studying Xbasic and SQL. I'm starting to understand things little by little and I love working with the Alpha family.

            So your new code says that if the textbox is greater then 61 char make a second line????.

            OK I'll give this new code a try.
            Last edited by BillWFG; 08-07-2013, 07:03 PM.

            Comment


              #7
              Re: Field Lenth

              This code is javascript; it takes a while before you know when to use html markup, javascript, xbasic, sql statements but you'll get there and then you become the magician!
              Frank

              Tell me and I'll forget; show me and I may remember; involve me and I'll understand

              Comment


                #8
                Re: Field Lenth

                I tried using this script at the onKeyup but I still can't get it to wrap my textbox at 60 char. Alternative would be to use a textarea and have that stop at 120 char.

                What do you think? Any ideas about this and how I can do it?

                Comment


                  #9
                  Re: Field Lenth

                  Well... I think you are using a textbox whereas the code is written for a textarea with id 'TEXTAREA1'

                  Sample component attached! (with a wrap @10 chars & max lenght 20 chars just for easy testing)

                  onkeyup.a5wcmp
                  Attached Files
                  Last edited by Clipper87; 08-08-2013, 04:01 AM.
                  Frank

                  Tell me and I'll forget; show me and I may remember; involve me and I'll understand

                  Comment


                    #10
                    Re: Field Lenth

                    Bill, this is not an easy thing to achieve with any consistency.

                    When you check other forums, it is kind of elusive.
                    http://stackoverflow.com/questions/5...236402#5236402

                    I would suggest you try with a fixed-width font in a textarea for editing, but it will be very hard to keep a consistent column count.

                    If you don't care how the text is entered (i.e. only how it is displayed afterwards), then use a text area for editing only, but then display it exactly as you want it in a text label or freeform html area or custom field or other. Using javascript or xBasic, you can thus construct your "perfectly" displayed and wrapped text, and have a separate textarea for editing either below it or via a separate popup dialog.

                    I don't know if this will work for you, but at least it would be consistent.

                    Comment


                      #11
                      Re: Field Lenth

                      It is indeed not so simple; in my sample code I use the onkeyup event but then what if a users just pushes a button and holds it ? No onkeyup event! So my code needs to be edited for that.
                      Frank

                      Tell me and I'll forget; show me and I may remember; involve me and I'll understand

                      Comment


                        #12
                        Re: Field Lenth

                        Thank you for all your advise. I'll try playing around with it and with the code you started me with I'm sure I'll get it worked out. Thank you so much.

                        Comment


                          #13
                          Re: Field Lenth

                          I just downloaded your sample code and you nailed it. By mistake accident I was using a textbox. When I switch it to a textarea your code worked floorlessly.

                          This will help me with several controls on my dialog/ux table where my controls were two controls and now I'll be able to switch to a single textarea. This will also make my report writing and searches much easier.

                          As I said I am learning step by step and loving every minute of it. Thank you for working with me and if you ever need my help please let me know. I'm an investigator in south Florida and would be happy to repay you with anything I could help you with.

                          Comment


                            #14
                            Re: Field Lenth

                            Bill, no need to thank; it's all about the fun learning to master this fantastic product!
                            Frank

                            Tell me and I'll forget; show me and I may remember; involve me and I'll understand

                            Comment


                              #15
                              Re: Field Lenth

                              Alpha is a fantastic product and it's a joy to work with you and others that I've met here. I have always felt like I was a part of something. 25 years ago my buddy Frank and I looked over the many software products on the market. We were looking for one for me to learn and build my office program. We ended up choosing Alpha Four Ver 2.1 for $69.00. I look back and laugh at how cheap that was but I did learn and I did write my first program using it and have always felt that Alpha was a good part of my life.

                              Frank never saw the A4 finished product working in my office. Sadly enough he died of kidney failure before I completed it. He however left me with great feelings of us working together and how much he taught me about programming with A4.

                              Your Buddy

                              Bill

                              Comment

                              Working...
                              X