Dear All,
can you please help me again? I have a listbox with these lines:
DE HU 2017-11-16
GB ES 2017-11-21
PL FR 2017-11-19
how can i make a button if I want to arrange by ascending and descending dates?
DE HU 2017-11-16
PL FR 2017-11-19
GB ES 2017-11-21
Thank you!
Dudus
Listbox Shorting
Moderator: Neosoft Support
Re: Listbox Shorting
Take a look at the options available on this listbox function:
http://neosoftware.com/community/viewto ... 22&t=21587
http://neosoftware.com/community/viewto ... 22&t=21587
David Payer
Des Moines, Iowa
USA
Des Moines, Iowa
USA
Re: Listbox Shorting
Thank you but im looking for an easier option without right click etc...
Any other easy solution?
Thank you!
D
Any other easy solution?
Thank you!
D
Re: Listbox Shorting
Dudus:
There is no easy way to sort items within NeoBook.
However, if your items are already stored on a file on disk, you can make use of the sort command offered in DOS ... something like this ...
... then load the sorted output into the Listbox.
Note 1: if your items are not on a disk file, you can always Loop through the items in the ListBox and write them out to a temporary file
Note 2: as I found out, this command does not work with folder/file names that contain spaces
Note 3: if you are running on a machine with a version of Windows older than XP, there is a slightly different syntax for the sort command ... see this web page for details ... https://www.computerhope.com/sorthlp.htm
There is no easy way to sort items within NeoBook.
However, if your items are already stored on a file on disk, you can make use of the sort command offered in DOS ... something like this ...
Code: Select all
Run "sort" "/+7 c:\gk\unsorted.txt /O c:\gk\ascending.txt" "RunOnce+Wait+Hidden" "" ""
Run "sort" " /R /+7 c:\gk\unsorted.txt /O c:\gk\descending.txt" "RunOnce+Wait+Hidden" "" ""
Note 1: if your items are not on a disk file, you can always Loop through the items in the ListBox and write them out to a temporary file
Note 2: as I found out, this command does not work with folder/file names that contain spaces
Note 3: if you are running on a machine with a version of Windows older than XP, there is a slightly different syntax for the sort command ... see this web page for details ... https://www.computerhope.com/sorthlp.htm
Re: Listbox Shorting
If ease is what you want, you can always hire someone to do your programming for you.Dudus wrote:Thank you but im looking for an easier option without right click etc...
Any other easy solution?
Thank you!
D
If you were to look at the functions, not just the demo app or the picture provided in the post, you would see that one of the functions is a sort. You don't even need to use the menuing option for that function. It is there for eye candy.
Read the full post. Download the function, look at the code that does the sorting (it is notated). It may be helpful.
David Payer
Des Moines, Iowa
USA
Des Moines, Iowa
USA
Re: Listbox Shorting
Y si probas esta solucion ? Me cuentas como funciona
And if you try this solution? You tell me how it works
And if you try this solution? You tell me how it works
Code: Select all
{NeoBook 5 Objects}
NeoBookVer=5,80
ObjectType=3
Name=PushButton7
X=219
Y=14
W=80
H=30
Anchor=0
Align=2
ImageStyle=0
ObjAction=strparse "DE HU 2017-11-16`GB ES 2017-11-21`PL FR 2017-11-19`JN RD 2016-09-21`GU JN 2017-03-04" "`" "[arr]" "[nArr]"¶¶loop "1" "[nArr]" "[i]"¶.for (var i in arr) {¶ tempArr[i] = arr[i].match(/([^0-9]+)|([0-9]+)/g);¶ ¶setvar "[tempArr[i]]" "[arr[i]]"¶¶loop "¶ for (var j in tempArr[i]) {¶ if( ! isNaN(n = parseInt(tempArr[i][j])) ){¶ tempArr[i][j] = n;¶ }¶ }¶ }
LineColor=0
LineWidth=1
LineStyle=0
FillColor=14277081
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=9
COSTA RICA
PURA VIDA
PURA VIDA
Re: Listbox Shorting
Thank you Gave! This working fine for meGaev wrote: Run "sort" "/+7 c:\gk\unsorted.txt /O c:\gk\ascending.txt" "RunOnce+Wait+Hidden" "" ""
Run "sort" " /R /+7 c:\gk\unsorted.txt /O c:\gk\descending.txt" "RunOnce+Wait+Hidden" "" ""[/code]
Dudus
Re: Listbox Shorting
Magnifico, años de jugar con DOS y primera vez veo a plenitud el poder de SORT.
Gracias
Magnifico, years of playing with DOS and the first time I fully see the power of SORT.
Thank you
Gracias
Magnifico, years of playing with DOS and the first time I fully see the power of SORT.
Thank you
COSTA RICA
PURA VIDA
PURA VIDA