PxPlus User Forum

Twitter Twitter Twitter

Recent Posts

Pages: 1 ... 8 9 [10]
91
Programming / Re: Selecting all list_box entries
« Last post by ksproul on September 19, 2019, 09:33:25 PM »
If the data in the list box is large, reading and writing it to select everything may be time consuming, especially in a client/server environment.  An example with 5,000 items in the list using an alternative method is shown below.  Un-remark line 220 to see the difference in time using the read/write method.  In my tests over a client/server internet (not intranet) connection took almost 4 times longer to select all of the items using the read/write method.

0010 begin
0015 print 'CS',
0020 precision 8
0025 list_box 10,@(10,5,40,10),opt="#"
0030 print "Loading ... ",; wait 0; t=tim
0035 for i=1 to 5000
0040 list_box load 10,0,str(rnd(10000):"0000")+str(rnd(10000):"0000")
0045 next i
0050 print @(0),"elapsted seconds:",(tim-t)*3600; wait 0
0055 print "Selecting ... ",; wait 0; t=tim
0060 selected=fn_lb_select_all(10)
0065 print "elapsed seconds:",(tim-t)*3600; wait 0
0070 list_box goto 10
0075 obtain "Press Enter to end",*,'LF'
0080 list_box remove 10
0085 end

0200 def fn_lb_select_all(local id)
0205 local items=id'itemcount,i,p$,v$
0210 if items then {
0215 list_box hide id
0220 ! list_box find 10,0,x$; list_box write 10,x$; goto 0235
0225 for i=items to 1 step -1; p$+=",selectitem",v$+=sep+str(i); next i
0230 id'_proplist$=p$(2),id'_propvalues$=v$(2)
0235 list_box show id
0240  }
0245 return items
0250 end def
92
Wish List / Re: Training video on v2020 Enhanced File Maintenance Wizard
« Last post by HendersonS on September 19, 2019, 06:48:56 PM »
hey ! Could you share these files for those who couldn't go to?
93
Programming / Re: Selecting all list_box entries
« Last post by James Zukowski on September 19, 2019, 05:11:13 PM »
I am looking to select them all. We're using this to set up some selection criteria where the normal situation is to start with everything, but they have the option to reduce it from there.
94
Wish List / Re: Training video on v2020 Enhanced File Maintenance Wizard
« Last post by jrosengarden on September 19, 2019, 05:05:46 PM »
Thanks Mike......already been working on walking thru the wizard with that PDF.
95
Programming / Re: Weird programming result
« Last post by Mike King on September 19, 2019, 04:34:32 PM »
Just to clarify; in a PRINT directive a numeric variable followed by a ":" indicates that a string expression follows which till define the format to use when outputting the number.

In your case the '+' was considered part of the string expression and thus the subsequent string text was included as the format.   To avoid this use a comma to separate the values.
96
Programming / Re: Selecting all list_box entries
« Last post by Mike King on September 19, 2019, 04:29:39 PM »
James,  your message seemed to indicate you want to select ALL the entries.  Is that what you were looking for or did you merely want to read the selected entries.
97
Wish List / Re: Training video on v2020 Enhanced File Maintenance Wizard
« Last post by Mike King on September 19, 2019, 04:26:47 PM »
Jeff,  glad you liked what we did with the file maintenance generator. 

While we will be looking to create additional videos and tutorials covering much of the presentations at DireXions, we did realize that Len covered a lot of information in his presentation.  Because of this we included, at the end of the PowerPoint PDFs, details on the various options available in the new generator that Len demonstrated.

Please have a look at the file "D2P2b-File Maintenance Wizard.pdf" on the USB your received at the conference starting around page 30.

98
Programming / Re: Selecting all list_box entries
« Last post by James Zukowski on September 19, 2019, 10:59:28 AM »
Either way will work. Just looking for something analagous to set them all.
99
Programming / Re: Selecting all list_box entries
« Last post by David Reynolds on September 19, 2019, 10:51:20 AM »
James,

You should simply be able to issue a

LBCTL'SelectCount=0

to deselect everything.

David
100
Programming / Re: Selecting all list_box entries
« Last post by James Zukowski on September 19, 2019, 09:56:19 AM »
Thank you!
That definitely is much better than the for/next loop I was using to write each one individually.
Now, if there was something as easy as list_box write x,0 that clears them all...
Pages: 1 ... 8 9 [10]