English
Forum

GridBOX-Lines de-selektieren

 

Pk
Hi,

with a Click can Yes in a GridBOX a row selektieren. Can these selection again cancel - means The GridBOX selektionsfrei make? I have here X3.1.

Regards, Peter
 
03/02/17  
 




H.Brill
Perhaps something like :
Window Title "Gridbox"
Window Style 31+512
Window 0,0-800,600
Declare lever Grid, BtnEnde, btnState
Declare Int row
Var Int end = 0
Grid     = Create("GridBox", %hwnd, "Nr.;0;40;Eintrag;0;135;DATUM;0;135", 2, 100, 70, 410, 370)
BtnEnde  = Create("Button",%hwnd,"ENDE",500,500,190,25)
btnState = Create("Button",%hwnd,"Deselektieren", 520,100,120,25)

WhileLoop 1, 50

    Addstring(Grid, Str $(&LOOP) + "|" + "EINTRAG" + "|" + Date$(0))

EndWhile

WhileNot end

    WaitInput

    If Clicked(BtnEnde)

        Let end = 1

    Endif

    If Clicked(btnstate)

        SendMessage(Grid, 4139, 1, 0)' row(n) entmarkieren

    EndIf

Endwhile

END
 
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.
03/02/17  
 




Pk
no, The selection changes of course of blue to gray, but the Selektion(en) remaining.
with "GetSelCount(n)" can itself the testing.

Regards, Peter
 
03/02/17  
 




Georg
Teles
good evening,

füge time The following hinzu
 $H commctrl.ph

Proc LvDeSelect'deselectieren

    Parameters Lv&,Item&
    Declare s#
    Dim s#,1024
    Long s#,12=0
    Long s#,16=~LVIS_SELECTED | ~LVIS_FOCUSED
    SendMessage(Lv&,~LVM_SETITEMSTATE,Item&,s#)
    Dispose s#

ENDPROC


and call these Proc at entmarkieren on
 $H commctrl.ph

Proc LvDeSelect'deselectieren

    Parameters Lv&,Item&
    Declare s#
    Dim s#,1024
    Long s#,12=0
    Long s#,16=~LVIS_SELECTED | ~LVIS_FOCUSED
    SendMessage(Lv&,~LVM_SETITEMSTATE,Item&,s#)
    Dispose s#

ENDPROC

Window Title "Gridbox"
Window Style 31+512
Window 0,0-800,600
Declare lever Grid, BtnEnde, btnState
Declare Int row
Var Int end = 0
Grid     = Create("GridBox", %hwnd, "Nr.;0;40;Eintrag;0;135;DATUM;0;135", 2, 100, 70, 410, 370)
BtnEnde  = Create("Button",%hwnd,"ENDE",500,500,190,25)
btnState = Create("Button",%hwnd,"Deselektieren", 520,100,120,25)

WhileLoop 1, 50

    Addstring(Grid, Str $(&LOOP) + "|" + "EINTRAG" + "|" + Date$(0))

EndWhile

WhileNot end

    WaitInput

    If Clicked(BtnEnde)

        Let end = 1

    Endif

    If Clicked(btnstate)

        'SendMessage(Grid, 4139, 1, 0)' row(n) entmarkieren
        LvDeSelect Grid,GetCurSel(Grid)' markierte row(n) entmarkieren

    EndIf

Endwhile

END

Hello
 
XProfan X3
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

03/06/17  
 




Pk
Hi,

I durchschaue your Proc now not, but tappt im dunkeln functions. the it so costly his must, have I really not expects. with of/ one selection in the GridBOX reicht one Click. with multiple selection becomes first The latest made deselektiert and one further Click The restlichen.
I had me first once with a hither and thither copy helped, but with of/ one right long GridListe lasts the already a while, so is it anyway plenty-plenty faster.

Thanks on you both and
Regards, Peter
 
03/07/17  
 




Georg
Teles
Yes there have You right, The Proc deaktiviert only a row, The lastly markierte.

circa any Lines abzufragen can You in example through of/ one Loop The following try
If Clicked(btnstate)

    'SendMessage(Grid, 4139, 1, 0)' row(n) entmarkieren

    WhileLoop 0,GetCount(Grid)-1'count of 0 To amount Entries less 1, since the first position = 0 is

        case GetState(Grid,&loop)>=1:LvDeSelect Grid,&loop'once The durchlaufende row markiert or active is, should tappt im dunkeln demarkiert go

    EndWhile

EndIf


If your list something longer is, look whether The Loop to plenty Time cost. I look as long as in my archive whether I there what Brauchbares without Loop find.

Hello
 
XProfan X3
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

03/10/17  
 




R.Schneider
Georg Teles (06.03.2017)
SendMessage(Lv&,~LVM_SETITEMSTATE,Item&,s#)


supplant time "Item&" through "-1", then ought to it for all Entries at a single blow functions.

Greeting
Rudger
 
Perbody is nofect !
03/12/17  
 




Pk
Hello together,

I durchschaue The Proc Yes not and the supplant the "Item&" with -1 naturally neither, but now functions it perfect!
Vielen Thanks and Regards, Peter
 
03/15/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

9.252 Views

Untitledvor 0 min.
H.Brill09/30/22
Tango10/30/21
Thomas Zielinski10/29/21
RudiB.09/09/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