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

get xdialog field name

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

    get xdialog field name

    this should be fairly simple, but i wasn't able to find anything about it.
    i either want to have a button, or a double click event, copy the data in a field on a form. i can copy the data if i explicitly put the field name in the code, but how do i get the field name that the cursor is in?

    just want to be able to copy all of the data in the field to teh clipboard.

    thanks
    Attached Files

    #2
    Re: get xdialog field name

    Not at all clear whether you are speaking of an xdialog, per the title, or a form, per the discussion. Don't think there are "double click events" for either. that leaves us with a button. When you push the button, the cursor (focus) is no longer in the field on the form, it is on the button.

    So Alpha provides The <OBJECT>.ACTIVE_PREV() method returns the name of the control which previously had focus.

    as in

    This script returns the name of the control on the Sales form that previously had focus.

    name = :Sales.Active_prev()
    There can be only one.

    Comment


      #3
      Re: get xdialog field name

      stan:

      it's an xdialog form. a button is fine. if i want a button to copy all of the text, spaces and all, of the first field (name), how would i do that, because i don't know the name of the field the cursor is in.

      Comment


        #4
        Re: get xdialog field name

        stan:

        and in the help file, i did see a reference to a double click event

        Dblclick The user double-clicks on the control

        Comment


          #5
          Re: get xdialog field name

          I'm old school. It is either an xdialog or a form. Never both. Any way......



          Looks like you can get the name of the active control with UI_DLG_CTL_CURRENT().
          There can be only one.

          Comment


            #6
            Re: get xdialog field name

            thanks stan, but i looked at that and that doesn't give me the name, it gives me the control:
            Name: |[50name]
            there has to be some way to return the name of the field without having to parse out control characters.

            Comment


              #7
              Re: get xdialog field name

              There must be.

              Code:
              ui_modeless_dlg_box("Basic Modeless Dialog", <<%dlg%
              {xmargin=10}
              {ymargin=2}
              <20,2Click Here!MyButton>{sp=2}<20,2Or Click Here!MyOtherButton>
              %dlg%)
               
              
              
              ? extract_string(ui_dlg_ctl_current("Basic Modeless Dialog"),"!",">")
              = "MyButton"
              There can be only one.

              Comment


                #8
                Re: get xdialog field name

                thanks again.
                i saw that in the help file, which is almost useless, but a lot better than the wiki help, which is totally useless.
                but as you mentioned in your first post, i don't want the button, i want the field the cursor was in before the button was clicked.

                is there a good xdialog book that can be purchaerd?

                Comment


                  #9
                  Re: get xdialog field name

                  I'm still not clear on what you want to do.

                  You are populating variables when you create an xdialog. What you do with the values entered into those variables is up to you.

                  See the example here that uses an xdialog for data entry.
                  There can be only one.

                  Comment


                    #10
                    Re: get xdialog field name

                    stan:
                    this is basically what i want to do. The xdialog that I posted is populated with data. The user needs to copy data from each field and paste it into some old unix system (don't ask). I just want an easy way to select the data in each field, so it can be pasted into another program. Doesn't matter if it's a button to select and copy the text the cursor was in last. Or double clicking the field and having that event select and copy the text.

                    Gary

                    Comment


                      #11
                      Re: get xdialog field name

                      I just want an easy way to select the data in each field, so it can be pasted into another program.
                      The data that is in each field on the xdialog is stored in the variable from which each control derives its name.

                      See if this helps, the control names don't make any difference.

                      Code:
                      ui_dlg_box("AutoAdvance Fields",<<%dlg%
                      When State and Phone fields are full, cursor automatically advances to next field.;
                      {lf};
                      {region}
                      Name:|[.40name];
                      State: |[%+%2.3state];
                      Phone: |[%+%3.4areaCode]{sp=.5}- [%+%3.4Exchange]{sp=.5}- [%+%4.5Number];
                      Country: |[.40country];
                      {endregion};
                      {line=1,0};
                      <10&OK> <10&Cancel>;
                      %dlg%,<<%code%
                      if a_dlg_button = "&OK" then
                          ui_msg_box("Notice","Name = "+var->name+crlf()+"State = "+var->state+crlf()+"Phone = "+var->areacode+"-"+var->exchange+"-"+var->number+crlf()+"Country = "+var->country)
                      end if
                      %code%)
                      Last edited by Stan Mathews; 10-14-2011, 05:36 PM.
                      There can be only one.

                      Comment


                        #12
                        Re: get xdialog field name

                        yes. it goes back to my original question. how do i get the filed name. whether i use the data in th field or the variable that populated the field, i still need to know which field they want to copy. i can't be the first person that ever wanted to get the field name the cursor was in when a button was clicked.

                        in the sample form, they can tab to a field, that field data is selected. they can press control c to copy the data to the clipboard. then they go to another program and paste that data in a field in that program. when they come back to the form, the cursor is not longer in any field, they have to click in a field. but double clicking in the field only selects a word, up to the first space, so they have to manually select the data in the field so it can be copied. they could go back to the previous field, press tab to get to the next field, but that's cumbersome.

                        i have no idea which field they will click in to copy. they don't always go in any order. i need to be able to get all of the data from which ever field they have selected with the mouse, as easy as possible. either double clicking in a field or putting the cursor in trhe field and clicking a button.

                        Comment


                          #13
                          Re: get xdialog field name

                          Added an example to my previous post.
                          There can be only one.

                          Comment


                            #14
                            Re: get xdialog field name

                            i'll check it out. thanks for your help

                            Comment


                              #15
                              Re: get xdialog field name

                              Have a play with this. Double click in the name and country 'fields'

                              Code:
                              ui_dlg_box("AutoAdvance Fields",<<%dlg%
                              When State and Phone fields are full, cursor automatically advances to next field.;
                              {lf};
                              {region}
                              Name:|[.40name!name_*];
                              State: |[%+%2.3state];
                              Phone: |[%+%3.4areaCode]{sp=.5}- [%+%3.4Exchange]{sp=.5}- [%+%4.5Number];
                              Country: |[.40country!Country_*];
                              {endregion};
                              {line=1,0};
                              <10&OK> <10&Cancel>;
                              %dlg%,<<%code%
                              if word(a_dlg_button,2,"_") = "Dblclick" then
                                  msgbox(word(a_dlg_button,1,"_"),eval(word(a_dlg_button,1,"_")))
                                  clipboard.Set_Data(eval(word(a_dlg_button,1,"_")))
                                  a_dlg_button = ""
                              else if a_dlg_button = "&OK" .or. a_dlg_button = "&Cancel"
                              	'do nothing - a_dlg_button is left with a value so dialog closes
                              else 
                              	a_dlg_button = "" 
                              end if
                              %code%)
                              Tim Kiebert
                              Eagle Creek Citrus
                              A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                              Comment

                              Working...
                              X