| |
|
|
- Page 1 - |
|
 Julian Schmidt | Hi, how can one in a GridBOX Entries Mark? which message must one take? CompileMarkSeparationcls
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 | CompileMarkSeparationcls
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 ▲ |
|
|
|