English
Forum

GridBOX - entry Mark

 
- Page 1 -



Julian
Schmidt
Hi,
how can one in a GridBOX Entries Mark?
which message must one take?
CompileMarkSeparation
cls
var GridBox&=Create("GridBox", %hwnd, "Eins;2;144;Zwei;2;144;Drei;2;144;Vier;2;144", 0, 20, 20, width(%hwnd)-40, height(%hwnd)-70)
clearlist
MoveListToHandle(GridBox&)
AddString(GridBox&,"Eins | Zwei | Drei | Vier")
AddString(GridBox&,"Zwei | Drei | Vier | Fünf")
AddString(GridBox&,"Drei | Vier | Fünf | Sechs")
AddString(GridBox&,"Vier | Fünf | Sechs | Sieben")
var Button&=Create("Button",%hwnd,"Eintrag markieren",20,height(%hwnd)-40,125,25)

while 1

    if getfocus(Button&)

        Sendmessage(GridBox&,$0185,1, -1)' Listbox-Message - lb_SetSel

    Endif

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/21/11  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer

CompileMarkSeparation
cls
var GridBox&=Create("GridBox", %hwnd, "Eins;2;144;Zwei;2;144;Drei;2;144;Vier;2;144", 0, 20, 20, width(%hwnd)-40, height(%hwnd)-70)
clearlist
MoveListToHandle(GridBox&)
AddString(GridBox&,"Eins | Zwei | Drei | Vier")
AddString(GridBox&,"Zwei | Drei | Vier | Fünf")
AddString(GridBox&,"Drei | Vier | Fünf | Sechs")
AddString(GridBox&,"Vier | Fünf | Sechs | Sieben")
var Button&=Create("Button",%hwnd,"Eintrag markieren",20,height(%hwnd)-40,125,25)

while 1

    if getfocus(Button&)

        'so
        Selectstring(GridBox&,-1,"Zwei")
        WaitInput
        'oder so
        Selectstring(GridBox&,-1,GetText$(GridBox&,3,0))

    Endif

Endwhile

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/21/11  
 




Julian
Schmidt
on Select String have so did i already virtual.
I have but hoped the it vlt a elegantere Solution were, z.B over Sendmessage

I have the whole time in a small Proc gefasst
CompileMarkSeparation
Proc SetSelectString

    Parameters Handle&,Reihe%
    Selectstring(Handle&,reihe%-1,GetText$(Handle&,reihe%,0))

EndProc

cls
declare reihe%
var GridBox&=Create("GridBox", %hwnd, "Eins;2;144;Zwei;2;144;Drei;2;144;Vier;2;144", 0, 20, 20, width(%hwnd)-40, height(%hwnd)-70)
clearlist
MoveListToHandle(GridBox&)
AddString(GridBox&,"Eins | Zwei | Drei | Vier")
AddString(GridBox&,"Zwei | Drei | Vier | Fünf")
AddString(GridBox&,"Drei | Vier | Fünf | Sechs")
AddString(GridBox&,"Vier | Fünf | Sechs | Sieben")
var Button&=Create("Button",%hwnd,"Eintrag markieren",20,height(%hwnd)-40,125,25)

while 1

    if getfocus(Button&)

        SetSelectString GridBox&,0

    Endif

Endwhile

 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/21/11  
 




Jörg
Sellmeyer
Per Api goes it naturally, is costly.
CompileMarkSeparation
 $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

Proc LvSelect'selectieren

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

EndProc

cls
var GridBox&=Create("GridBox", %hwnd, "Eins;2;144;Zwei;2;144;Drei;2;144;Vier;2;144", 0, 20, 20, width(%hwnd)-40, height(%hwnd)-70)
clearlist
MoveListToHandle(GridBox&)
AddString(GridBox&,"Eins | Zwei | Drei | Vier")
AddString(GridBox&,"Zwei | Drei | Vier | Fünf")
AddString(GridBox&,"Drei | Vier | Fünf | Sechs")
AddString(GridBox&,"Vier | Fünf | Sechs | Sieben")
var Button&=Create("Button",%hwnd,"Eintrag markieren",20,height(%hwnd)-40,125,25)

while 1

    WaitInput

    if Clicked(Button&)

        LvSelect(GridBox&,2)
        SetFocus(GridBox&)'wenn man den Eintrag auch aktiv haben will

    Endif

Endwhile

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/21/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.413 Views

Untitledvor 0 min.
RudiB.04/11/22
Thomas Zielinski10/29/21
kustg05/08/19
Walter06/08/18
More...

Themeninformationen

this Topic has 2 subscriber:

Jörg Sellmeyer (2x)
Julian Schmidt (2x)


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