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

Drop-Down Tree Conrol

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

    Drop-Down Tree Conrol

    Hi Everyone,

    In according the help, the Drop-Down Tree can be set the Event but I am not able to established the Event at all.
    Code:
    Drop Down Tree Control Syntax
    
    Syntax   [ [. Width ] Variable_Name ^=< Choice_Array [ ! Event ][ ? Enabled ] ]

    I have the test Code here.
    Code:
    
    dim treeoptions as C
    
      
    treeoptions = <<%str% 
    Power . No Power 
    Network . Can't log in 
    Network . Can't connect 
    Network . Invalid username or password 
    Network . Other 
    Printer . Specific error message 
    Printer . Print job stuck in queue 
    Printer . Paper Jam 
    Printer . Can't print 
    Printer . Print job going to another printer 
    Printer . Other 
    Software . Program error 
    Software . Virus 
    Network . Setup new account 
    Software . Install software 
    Software . Can't access email 
    Hardware . Noisy 
    Hardware . Can't boot / hangs during boot 
    Hardware . No display on monitor 
    Printer . Install printer 
    Software . Computer freezes 
    Relocate . Equipment 
    Relocate . User data 
    Relocate . User account 
    Hardware . Install new hardware 
    %str%
    
      
    ui_dlg_box("Drop Down Tree Control",<<%dlg%
    {lf};
    Dropdown Tree:| [%S=BRL%.50option^=<treeoptions!vTree_*];
    {lf};
    Sample cell:| [.10Samplecell!ul_cell_*];
    {lf};
    
    <cancel>;
    %dlg%,<<%code%
    If left(alltrim(a_dlg_button),6) ="vTree_" then
    	'msgbox("Event ")
    	If a_dlg_button ="vTree_setfocus" then
    		msgbox("event status","setfocus"+a_dlg_button)
    	end if
    	If a_dlg_button ="vTree_change" then
    		msgbox("event status","Changed"+a_dlg_button)	
    	end if
    	If a_dlg_button ="vTree_killfocus" then
    		msgbox("event status","killfocus"+a_dlg_button)	
    	end if	
    	a_dlg_button =""
    end if
    
    if left(a_dlg_button,7) = "ul_cell" then
        if a_dlg_button = "ul_cell_killfocus" then
        	ul_cell = upper(samplecell)
        	msgbox("Cell Killfocus: "+ul_cell)
            'frow = regex_merge(samplecell, "[A-Z]","")
            'fcol = asc(regex_merge(samplecell, "[0-9]",""))-64
        end if
        a_dlg_button = ""
    
    end if
    
    %code%)
    Did I missing something on the Dropdown Tree's event handle?

    #2
    Re: Drop-Down Tree Conrol

    Put debug(1) as a new line
    just after
    %dlg%,<<%code%

    You will see that a_dlg_button takes the value vTree_
    with no event name.

    Here's the section on tree control event
    http://wiki.alphasoftware.com/Tree+Control+Events

    Contrast the Tree Control Syntax where one sees !Events
    with Drop Down Tree Control Syntax where we see !Event

    would indicate to me that the drop down only has one event.
    Last edited by Stan Mathews; 05-15-2015, 09:42 AM.
    There can be only one.

    Comment


      #3
      Re: Drop-Down Tree Conrol

      Hi Stan,

      I have tested it with Drop-down syntax but the EVENT still did not work.

      Code:
      
      paths = <<%str%
      A\!event_A
      B\!event_B
      C\!event_C
      %str%
      
      '[%X;S=BRL;D="\"%.40,10path^<paths];
      'Just replaced the DropDown Syntax
      
      
      ui_dlg_box("DropDown Tree",<<%dlg%
      
      
      {lf};
      Drop-Down Tree:;
      [%X;S=BRL;D="\"%.40path^=<paths];
      {lf};
      
      [.40path]|
      
      |<OK>;
      
      %dlg%, <<%code%
      if a_dlg_button = "event_a" then
          a_dlg_button = ""
          expanded_a = <<%str%
      A\Item 1
      A\Item 2
      A\Item 3
      %str%
          paths = stritran(paths,"A\!event_A",expanded_a)
          showvar(paths,"test ")
          paths = word_change("1",paths,crlf())
          path = word(expanded_a,1,crlf())
      end if
      if a_dlg_button = "event_b" then
          a_dlg_button = ""
          expanded_b = <<%str%
      B\Item 4
      B\Item 5
      B\Item 6
      %str%
          paths = stritran(paths,"B\!event_b",expanded_b)
          paths = word_change("1",paths,crlf())
          path = word(expanded_b,1,crlf())
      end if
      if a_dlg_button = "event_c" then
          a_dlg_button = ""
          expanded_c = <<%str%
      C\Item 7
      C\Item 8
      C\Item 9
      %str%
          paths = stritran(paths,"C\!event_c",expanded_c)
          paths = word_change("1",paths,crlf())
          path = word(expanded_c,1,crlf())
      end if
      %code%)
      Attached Files

      Comment


        #4
        Re: Drop-Down Tree Conrol

        Code:
        dim treeoptions as C
        
          
        treeoptions = <<%str% 
        Power . No Power 
        Network . Can't log in 
        Network . Can't connect 
        Network . Invalid username or password 
        Network . Other 
        Printer . Specific error message 
        Printer . Print job stuck in queue 
        Printer . Paper Jam 
        Printer . Can't print 
        Printer . Print job going to another printer 
        Printer . Other 
        Software . Program error 
        Software . Virus 
        Network . Setup new account 
        Software . Install software 
        Software . Can't access email 
        Hardware . Noisy 
        Hardware . Can't boot / hangs during boot 
        Hardware . No display on monitor 
        Printer . Install printer 
        Software . Computer freezes 
        Relocate . Equipment 
        Relocate . User data 
        Relocate . User account 
        Hardware . Install new hardware 
        %str%
        
          
        ui_dlg_box("Drop Down Tree Control",<<%dlg%
        {lf};
        Dropdown Tree:| [%S=BRL%.50option^=<treeoptions!vTree_*];
        {lf};
        Sample cell:| [.10Samplecell!ul_cell_*];
        {lf};
        
        <cancel>;
        %dlg%,<<%code%
        If left(alltrim(a_dlg_button),6) ="vTree_" then
        	msgbox("Event "+a_dlg_button)
        	msgbox("Since the only value in a_dlg_button is "+ a_dlg_button+crlf()+"one can't test for killfocus, setfocus, etc.")	
        	msgbox("This message box appears several times so it would that several events occur, just not reported.")
        	msgbox("May be a bug.")
        	a_dlg_button =""
        end if
        
        if left(a_dlg_button,7) = "ul_cell" then
            if a_dlg_button = "ul_cell_killfocus" then
            	ul_cell = upper(samplecell)
            	msgbox("Cell Killfocus: "+ul_cell)
                'frow = regex_merge(samplecell, "[A-Z]","")
                'fcol = asc(regex_merge(samplecell, "[0-9]",""))-64
            end if
            a_dlg_button = ""
        
        end if
        
        %code%)
        There can be only one.

        Comment


          #5
          Re: Drop-Down Tree Conrol

          Nice Stan, nothing like an endless loop... ;)
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #6
            Re: Drop-Down Tree Conrol

            Sometimes it takes one to get the point across.
            There can be only one.

            Comment


              #7
              Re: Drop-Down Tree Conrol

              If I remember correctly, this was brought up few years back and deemed as a bug. I do not know what became of it. Will follow up with Selwyn. Incidentally, the dropdown tree does not take ANY of the events (that's the bug part) and the repeated popup msg boxes is due to a completely different reason. It's a horse of a totally different color better left out of this discussion as it will only serve to add to the confusion.
              I have a pretty good idea (guess) as to the nature and reason for this bug and that is the dropdown tree control requires more clicks than other controls for something to happen and by then, alpha would have missed out on what was associated with the first click.
              For example, if you have a multi list control and you click to a different choice on the list, that is a "change" event that alpha will recognize and act accordingly. But in a dropdown tree, you have to first click on the control, then click to open the tree.
              To illustrate my point:
              If you have a modal xdlg that has controls in it and any of these controls has an event but no code associated with that event in the code section and if you click on that control, alpha will recognize the event and since there is no associated code, it will close the xdlg.
              So, try this:
              In a modal xdlg (use the above as an example) keep the events in the dropdown tree and the type-in control but remove all codes from the code section.
              1-Run the xdlg and click on the type-in field. Alpha will close the xdlg immediately
              2-Run it again and now click on the dropdown tree control.
              What happens?
              Nothing
              Click for the second time. What happens?
              Now it's closed. Sometimes it takes more than 2 clicks.
              3-For more lagnappe, run it again and this time don't click the dropdown tree control itself but the button to the right that opens the tree.
              What happens?
              Alpha closes on the first click.
              What does that tell you?

              Comment


                #8
                Re: Drop-Down Tree Conrol

                Incidentally, I believe the same behavior was reported for dropdown combo control

                Comment


                  #9
                  Re: Drop-Down Tree Conrol

                  Originally posted by G Gabriel View Post
                  Incidentally, I believe the same behavior was reported for dropdown combo control
                  Yup. I know I did. I can't remember if it's ^= or the ^+ operator (I'm pretty sure it's ^=), but the grief of this problem I'm still scarred by to this day.
                  Mike W
                  __________________________
                  "I rebel in at least small things to express to the world that I have not completely surrendered"

                  Comment


                    #10
                    Re: Drop-Down Tree Conrol

                    OK, I am willing to be wrong. I just re-tried combo box events within a dialog with the attached example and both the ^+ and the ^= operators (line 40) seems to work perfectly well.
                    Attached Files
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                      #11
                      Re: Drop-Down Tree Conrol

                      Mike:
                      I thought it was you and no you are not wrong, Selwyn responded back that at least the change event is firing. I am not seeing that in my version, so it must have been fixed in the newer ones.

                      Comment


                        #12
                        Re: Drop-Down Tree Conrol

                        Thank you

                        Comment


                          #13
                          Re: Drop-Down Tree Conrol

                          I really had nothing to offer, sorry..but check your version/build/update..

                          Comment

                          Working...
                          X