English
Source / code snippets

GridBOX & Co. 1.slot correctly. sortiert to numbers

 

H.Brill
what not everyone white :
The automatic Sorting with whom List - Controls happens Yes
to ASCII, d. h. to 1 comes 10, 11, 12 etc. and not 2, 3, 4
If the numbers but immediately long made go (z.B.001 instead of 1)
so goes too The Sorting correctly.. the goes best with stature$().
Declare lever grid, list
Window 500, 200
grid  = Create("Gridbox", %HWnd, "spalte 1;0;60;spalte 2;0;80;spalte 3;0;60", 1, 10, 10, 220, 100)
list = Create("Listbox", %HWnd, 1, 250, 10, 220, 100)

WhileLoop 100, 1, -1

    AddStrings(grid, stature$("000", &LOOP) + "|" + "AAA" + "|" + "BBB")
    AddStrings(list, stature$("000", &LOOP))

EndWhile

While 1

    Waitinput

EndWhile

 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
12/03/22  
 




Sven
Bader
here another example, a unsortierte list by hand To sort by Bubble Sort.
Declare lever grid, list
Declare thisRow$, nextRow$, done&,count&
Window 340, 500
list = Create("Listbox", %HWnd, 0, 0, 0, 320, 400)

WhileLoop 100, 1, -1

    AddStrings(list,  st$(&LOOP)+". Zeile")

EndWhile

count& = GetCount(list) - 1
SendMessage(list,  $000B, 0, 0)'wm_SetRedraw

WhileNot done&

    done& = 1

    WhileLoop count&

        thisRow$ = GetString$(list, &loop - 1)
        nextRow$ = GetString$(list, &loop)

        If val(thisRow$) > val(nextRow$)

            DeleteString(list, &loop - 1)
            InsertString(list, &loop, thisRow$)
            done& = 0

        EndIf

    EndWhile

EndWhile

SendMessage(list, $000B, 1, 0)'wm_SetRedraw
WaitKey
 
12/22/22  
 




p.specht

me has one erstes area the Darstellungslänge 0 byte sometimes very helped ...
The gestaltbare Sorting follows then only whom Einträgen there.
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
12/27/22  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.818 Views

Untitledvor 0 min.
H.Brill vor 4 Tagen
Gast.081510/03/24
ecki07/28/23
Wilfried Friebe05/28/23
More...

Themeninformationen

this Topic has 3 subscriber:

p.specht (1x)
Sven Bader (1x)
H.Brill (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie