English
Forum

Gridboxen

 

Abigail
Hello people,
I have time one something revised Example for a Sorting to Substrings uses. in the principle works the indeed integrally wonderful, but ex of/ one conscience Size, by me Satzgröße 248 byte * ca. 400 Sätze, functions The Sort GRIDBOX integrally simply not any more. so between 400 and 500 Datensätzen is simply a Sorting only to oftmaligem activate (if at all) the 'Sortierbuttons' possible.
is the one bow or have I there somewhere a constraint überlesen??

under the Original Program from the Help
Declare lever Grid, btn1, btn2, btn3, btn4, btn5
Window Title "Sortiertes Grid"
Window 600, 400
Grid  = Create("Gridbox", %HWnd, "Nummer;0;60;Name;0;100;Ort;0;120;Gehalt;0;60", 0, 10, 50, 340, 200)
btn1  = Create("Button",  %HWnd, "Sort", 10, 10, 60, 25)
btn2  = Create("Button",  %HWnd, "Sort", 75, 10, 60, 25)
btn3  = Create("Button",  %HWnd, "Sort", 170, 10, 60, 25)
btn4  = Create("Button",  %HWnd, "Sort", 290, 10, 60, 25)
btn5  = Create("Button",  %HWnd, "Ende", 500, 10,60, 25)
AddStrings(Grid, "500|Maier|Köln|4000")
AddStrings(Grid, "400|Schmidt|Hamburg|3000")
AddStrings(Grid, "300|Bauer|Mannheim|3500")
AddStrings(Grid, "200|Klein|Düsseldorf|3000")
AddStrings(Grid, "100|Fuchs|Stuttgart|7500")

WhileNot Clicked(btn5)

    WaitInput
    ClearList 0
    Move("HandleToList", Grid)

    If Clicked(btn1)

        SortList 5

    ElseIf Clicked(btn2)

        SortList "|", 2, 1

    ElseIf Clicked(btn3)

        SortList "|", 3, 1

    ElseIf Clicked(btn4)

        SortList "|", 4, 5

    EndIf

    ClearList Grid
    Move("ListToHandle", Grid)
    Case %Key = 2 : Break

EndWhile


thanks for Your response,

Abigail
 
07/04/16  
 




Jörg
Sellmeyer
I faith, there are you simply To eager. If many Datensätze present are, lasts the Sortiervorgang simply something longer. particularly in the interpreter mode power itself the then noticeable.

I Have your Program time yet something changed, so it "ruhiger" runs.
so becomes The Sortierroutine only called, if of/ one the Buttons clicked becomes.
Declare lever Grid, btn1, btn2, btn3, btn4, btn5
Window Title "Sortiertes Grid"
Window 600, 400
Grid = Create("Gridbox", %HWnd, "Nummer;0;60;Name;0;100;Ort;0;120;Gehalt;0;60", 0, 10, 50, 340, 200)
btn1 = Create("Button", %HWnd, "Sort", 10, 10, 60, 25)
btn2 = Create("Button", %HWnd, "Sort", 75, 10, 60, 25)
btn3 = Create("Button", %HWnd, "Sort", 170, 10, 60, 25)
btn4 = Create("Button", %HWnd, "Sort", 290, 10, 60, 25)
btn5 = Create("Button", %HWnd, "Ende", 500, 10,60, 25)
var lever btn6 = Create("Button", %HWnd, "Test", 400, 10,60, 25)

Proc SortMyList

    Parameters Int SortString
    ClearList 0
    Move("HandleToList", Grid)
    SortList "|",SortString,1
    ClearList Grid
    Move("ListToHandle", Grid)

ENDPROC

Randomize

WhileLoop 1,1500,5

    AddStrings(Grid, stature$("000",&Loop) + "|Maier|Köln|" + Str $(Rnd(8000)))
    AddStrings(Grid, stature$("000",&Loop + 1) + "|Schmidt|Hamburg|" + Str $(Rnd(8000)))
    AddStrings(Grid, stature$("000",&Loop + 2) + "|Bauer|Mannheim|" + Str $(Rnd(8000)))
    AddStrings(Grid, stature$("000",&Loop + 3) + "|Klein|Düsseldorf|" + Str $(Rnd(8000)))
    AddStrings(Grid, stature$("000",&Loop + 4) + "|Fuchs|Stuttgart|" + Str $(Rnd(8000)))

Wend

While 1

    WaitInput
    Case Clicked(btn5):Break

    If Clicked(btn1)

        SortMyList 1

    ElseIf Clicked(btn2)

        SortMyList 2

    ElseIf Clicked(btn3)

        SortMyList 3

    ElseIf Clicked(btn4)

        SortMyList 4

    ElseIf Clicked(btn6)

        print "a"

    EndIf

    Case %Key = 2 : Break

EndWhile


now would it naturally yet interestingly to know, what very You changed have, circa exclude to, whether it on this Changes lying.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
07/04/16  
 




Abigail
Hello Jörg, thanks for Info, or improvement. my Changes were really only marginal. 1. altogether 7 decompose in the scheduler, 2. naturally name and Size the individual Split. moreover naturally for each slot On and ex Sortier-Button, means altogether 14 Piece.
now, I have in the meantime a Solution found, The Although a little umständlich appear, but functions. withal the crowd the Sätze, I have it To 5000 probiert, in a Zehntelsekunde sortiert.
sees then about so from:

If Clicked(SORT[1])
ClearList 0
Move("HandleToList", GRID)
SortList "|", 1 ,5
ClearList Grid
Move("ListToHandle", Grid)
ElseIf Clicked(SORT[2])

an so on To SORT[14]
the functions really without each Verzögerung self in the Interpreter mode.

Why The Beispielroutine How

While ...
ClearList 0
Move("HandleToList", GRID)

If Clicked(SORT[1])
SortList "|", 1 ,5
ElseIf Clicked(SORT[2])
SortList "|", 2 ,5
"" ""
ElseIf Clicked(SORT14])
SortList "|", 7 ,-3
ENDIF

ClearList Grid
Move("ListToHandle", Grid)

ENDWHILE

so infinite lazy ex of/ one conscience Size, or. none functions, erschließt itself I do not integrally.

nevertheless thanks for your hints, I will time tommorrow bring into action to see, whether it so too functions.

Sincerely,
Abigail
 
07/04/16  
 




maroro
Hello into round ...Gridboxen sort is too straight my Topic.
thereby works the sort wonderful only The Solution eachone slot a button To give liberally gefällt me not at all. How is it possible a Click on The Spaltenüberschrift To discern too still correctly if The Size the column changed watts?

be tensely on your Proposals

maroro
 
11/25/17  
 




Thomas
Freier
is here include:  [...] 
 
Gruß Thomas
Windows XP SP2, XProfan X2
11/27/17  
 




maroro
have it found ...thanks Thomas
and if I must would I the suitable View source too post.
 
11/28/17  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.889 Views

Untitledvor 0 min.
RudiB.02/13/24
Stringray01/05/22
H.Brill10/01/21
Langer01/11/21
More...

Themeninformationen



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