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

Xdialog Highlight non focused listbox selections

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

    Xdialog Highlight non focused listbox selections

    Hi,

    Is it possible to keep the selected items highlighted in a list box when it looses focus?

    Capture.JPG

    Code:
    dim people as c
    people = <<%str%
    {data=Joe Smith}Joe|Smith
    {data=John Smith}John|Smith
    {data=John Public}Ann|Jones
    %str%
    dim person as c = "John Smith"
    dim events as c
    
    
    ui_dlg_box("",<<%dlg%
    This dialog shows the events fired by a simple ListView;
    {lf};
    [20field1];
    [%M;K%.100,10person^"Firstname|Lastname"people];
    [20field2];
    
    %dlg%)
    I'm creating a Xdialog with several list views and a tree view and it's hard for the users to see what items they have selected when going to the next control!

    Capture2.JPG

    Thanks in advance for any help

    Pete
    Pete Jones
    IT Manager
    Midlands Metal Fabrications

    #2
    Re: Xdialog Highlight non focused listbox selections

    I don't do much with xdialog but I don't see keeping the highlight of an unfocused control as an option.

    Can you add a variable, store the choices made to it (concatenating) and display that in the lower right corner?

    Or display the variables themselves?

    Code:
    Mode_n = 1
    Mode_c = "Exclusive"
    choices = <<%a%
    Shared
    Read only
    Exclusive
    %a%
    
    result=ui_dlg_box("Title",<<%dlg%
    Filename:| [.32filename];
    Open as:;
    Mode:| [.10,5mode_n^#choices];
    Mode:| [.10,5mode_c^#choices];
    <OK>;
    Numeric Mode:|[.10mode_n];
    Character Mode:|[.10mode_c]
    %dlg% )
    Last edited by Stan Mathews; 02-15-2017, 09:40 AM.
    There can be only one.

    Comment


      #3
      Re: Xdialog Highlight non focused listbox selections

      Hi Stan,

      Thanks for your reply.

      Adding variables may be my best option!

      My other thought was, are there any options anywhere to globally change the unfocused colour? is this set by alpha5 or the windows operating system?

      Pete
      Pete Jones
      IT Manager
      Midlands Metal Fabrications

      Comment


        #4
        Re: Xdialog Highlight non focused listbox selections

        Check box list?
        Al Buchholz
        Bookwood Systems, LTD
        Weekly QReportBuilder Webinars Thursday 1 pm CST

        Occam's Razor - KISS
        Normalize till it hurts - De-normalize till it works.
        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
        When we triage a problem it is much easier to read sample systems than to read a mind.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #5
          Re: Xdialog Highlight non focused listbox selections

          You should be able to do what you want.

          MultipleSelects.JPG

          Code:
          'Create an XDialog dialog box to prompt for parameters.
          DIM SHARED vcHead as C = ""
          dim shared vcHeadTransno as C
          DIM GLOBAL vcSwk as C
          DIM SHARED vcSwkNo as C
          DIM GLOBAL vcCA as C
          DIM SHARED vcCATno as C
          DIM SHARED vcCASwkNo as C = ""
          DIM SHARED varC_result as C
          
          ''see if logged in user is a tech or inspector
          dim shared Inspector as L = .F.
          permis = lookup("wodesclabor_m_entry_mech1", "Initials="+s_quote(var->vc_user),"mechlevel")
          if permis = "I" then
          	inspector = .T.
          end if
          
          auto_list_vcHead = table.external_record_content_get("wo_hdr",\
          "alltrim(Billingname)+\"|\"+N_Number+\"|\"+alltrim(Make)+\" \"+alltrim(Model)+\"|\"+Wo_No+\"|\"+space(5)+\"$\"+transno+\"$$\" ",\
          "invert(Wo_no)",\
          "alltrim(n_number)<>\"\" .and. (Paid=\"N\" .or. (Paid=\"I\" .and. alltrim(remspecial(dtoc(date_closed))) = \"\" ) ) .and. Site =" + s_quote(var->vc_user_site) )
          
          Dim format as p
          Format.tab_stops="2.5,3.5,5.5,7"
          Format.odd_row_color="White"
          Format.even_row_color="White"
          Format.odd_selected_color="Dark Blue"
          Format.even_selected_color="Dark Blue"
          Format.font="calibri,11"
          Format.font_color_unselected="Black"
          Format.font_color_selected="White"
          Format.lastbutton="OK"
          Format.group_size=1
          Format.number_rows=.f.
          Format.alternating_bands=.f.
          
          'Apply 'owner draw' formatting information to the list
          auto_list_vcHead = a5_owner_draw_list_fmt(auto_list_vcHead,Format)
          
          temp_count = w_count(auto_list_vcHead,crlf())
          DELETE a_vcHead
          DIM a_vcHead[temp_count] as c
          a_vcHead.initialize(auto_list_vcHead)
          
          auto_list_vcSwk=""
          auto_list_vcCA=""
          
          ok_button_label = "&Save"
          cancel_button_label = "&Close"
          vTitle = "Enter/Change Corrective Actions"
          varC_result = ui_modeless_dlg_box(vTitle,<<%dlg%
          {units=F}{font=calibri,11}{ysize=.3}{xmargin=4,4}
          {can_exit=close}
          {position=remember=vTitle}
          
          {region}
          Open Work Orders:;
          [%d;O={@@}%.82,6vcHead^#a_vcHead!NewHead];
          {endregion};;
          
          {region}
          Work Order Discrepancies:  <%T=Add a New Discrepancy to this Work Order;B=T;I=$$code.library.add%!NewSqwK?inspector = .T.>
           <%T=Print a New Discrepancy Sheet;B=T;I=$$print%!PrintSqwK?inspector = .T.>;
          {font=fixdsys regular,10}
          [.110,10vcSwk^#auto_list_vcSwk!SelectSwk_*];
          {endregion};;
          
          {region}
          {font=calibri,11}
          Corrective Actions - Double Click on Item to Edit.
          Checked Item Requires Inspection.  Glasses Item is Signed Off.  Green Ball Item Sent to Work Order:;
          {font=fixdsys regular,10}
          [%O={@@}%.110,10vcCA^#auto_list_vcCA!Edit_*]
          {endregion};;
          
          {region}
          {font=calibri,11}
          {comment=<*15=ok_button_label!OK>}
          {justify=center,center}
          <Refresh!refresh_view>  <View Report!view_report>
          {endregion};
          %dlg%,<<%code%
          Last edited by Ronald Anusiewicz; 02-16-2017, 12:06 PM. Reason: Added the begining of the script for clarity
          Alpha 5 Version 11
          AA Build 2999, Build 4269, Current Build
          DBF's and MySql
          Desktop, Web on the Desktop and WEB

          Ron Anusiewicz

          Comment


            #6
            Re: Xdialog Highlight non focused listbox selections

            Ron,

            What is your trick? I could not find that.

            Comment


              #7
              Re: Xdialog Highlight non focused listbox selections

              If you want to call it a trick, I used sys_send_keys. When the choice is changed in the first list, the send_keys command activates each other list which activates the first record in the other lists. Other than that, I can't remember doing anything special to keep the active record in the list highlighted.

              Code:
              %dlg%,<<%code%
              
              IF a_dlg_button = "close" THEN		'Close
              	ui_modeless_dlg_close(vTitle)
              	end
              	
              ELSEif a_dlg_button = "newhead" THEN
              	vcHeadTransno=extract_string(vcHead,"$","$$")
              	auto_list_vcSwk = table.external_record_content_get("wosquawk",\
              	"\"Item: \"+Itemno+\" \"+left(Descrep,100)+space(60)+\"&\"+swkno+\"&&\"","Itemnorpt",\
              	"Transno="+s_quote(vcHeadTransno))
              	vcSwkNo=extract_string(vcSwk,"&","&&")
              	auto_list_vcCA=CA_List(vcHeadTransno)
              	xbasic_wait_for_idle()
              	sys_send_keys("{tab}{Home}{tab}{Home}")
              	a_dlg_button = ""
              
              ELSEif a_dlg_button = "SelectSwk_dblclick" THEN
              	vcSwkNo=extract_string(vcSwk,"&","&&")
              	NewEntry(vcHeadTransno, vcSwkNo, var->vc_user_site)
              	auto_list_vcCA=CA_List(vcHeadTransno)
              	a_dlg_button = ""
              
              ELSEif a_dlg_button = "NewSqwK" THEN
              	script_play_local("WONewDesc")
              	vcHeadTransno=extract_string(vcHead,"$","$$")
              	auto_list_vcSwk = table.external_record_content_get("wosquawk",\
              	"\"Item: \"+Itemno+\" \"+left(Descrep,100)+space(60)+\"&\"+swkno+\"&&\"","Itemnorpt",\
              	"Transno="+s_quote(vcHeadTransno))
              	a_dlg_button = ""
              		
              ELSEif a_dlg_button = "Edit_dblclick" THEN
              	vcCAKey = extract_string(vcCA,"&","&&")
              	if ChgEntry( vcCAKey, var->vc_user_site) = .T. then
              		auto_list_vcCA=CA_List(vcHeadTransno)
              	end if
              	a_dlg_button = ""
              	
              ELSEif a_dlg_button = "view_report" THEN
              	if alltrim(vcHeadTransno) = "" then
              		msgbox("Oops","Please Select an Open Work Order",UI_ATTENTION_SYMBOL+UI_OK)
              	else
              		query.filter = "transno = " + s_quote(vcHeadTransno)
              		query.order = "transno"
              		query.filter = convert_expression(query.filter,"VE")
              		:Report.Preview("CA",query.filter,query.order)
              	end if
              	
              	a_dlg_button = ""
              
              ELSEif a_dlg_button = "PrintSqwK" THEN
              	if alltrim(vcHeadTransno) = "" then
              		msgbox("Oops","Please Select an Open Work Order",UI_ATTENTION_SYMBOL+UI_OK)
              	else
              		script_play_local("WOPrintThisDesc")
              	end if
              	
              	a_dlg_button = ""
              	
              ELSEif a_dlg_button = "Refresh_View" THEN
              	auto_list_vcCA=CA_List(vcHeadTransno)
              	
              	a_dlg_button = ""
              	
              END IF
              
              %code%)
              Alpha 5 Version 11
              AA Build 2999, Build 4269, Current Build
              DBF's and MySql
              Desktop, Web on the Desktop and WEB

              Ron Anusiewicz

              Comment


                #8
                Re: Xdialog Highlight non focused listbox selections

                Ron,

                Thank you for sharing.

                Comment


                  #9
                  Re: Xdialog Highlight non focused listbox selections

                  Thanks everyone, Have some good examples to try!

                  For now I've gone with Stan's method of displaying all the variables at the bottom of the dialog

                  I shall look at Ron's example later when I have some more time
                  Pete Jones
                  IT Manager
                  Midlands Metal Fabrications

                  Comment

                  Working...
                  X