| |
|
|
Jörg Sellmeyer |
$H commctrl.ph
$H structs.ph
Struct LV_COLUMN = ~LV_COLUMN
Proc LV_SetColumnText
Parameters Hdl&,index%,Text$
Declare Column#,success%
Dim Column#,LV_COLUMN
With Column#
.mask& = ~LVCF_TEXT
.pszText& = Addr(Text$)
success% = SendMessage(Hdl&,~LVM_SETCOLUMN,index%,Column#)
EndWith
Dispose Column#
Return success%
ENDPROC
Cls
Var LV& = Create("GridBox",%hwnd,"Test 1;0;100;Test 2;0;100;Test 3;0;100",0,2,100,320,300)
waitinput
WhileLoop 0,2
LV_SetColumnText(LV&,&Loop ,New " + Str $(&Loop + 1))
Wend
waitinput
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/06/11 ▲ |
|
|
|
|
Jörg Sellmeyer | so can too yet The wide take on and the Text read. the whole then too times without structure:
$H commctrl.ph
Proc LV_SetColumn
Parameters Hdl&,Mask&,index%,Text$,w%
Declare Column#,success%
Dim Column#,24
Long Column#,0=Mask&
Long Column#,8= w%
Long Column#,12=Addr(Text$)
success% = SendMessage(Hdl&,~LVM_SETCOLUMN,index%,Column#)
Dispose Column#
Return success%
ENDPROC
Proc LV_GETCOLUMN
Parameters Hdl&,index%
Declare Column#,Text$,success%
Dim Column#,24
Text$ = MkStr$("\z",160)' here adjust, if The Texts longer his should
Long Column#,0=~LVCF_TEXT
Long Column#,12=Addr(Text$)
Long Column#,16=160' s.o.
SendMessage(Hdl&,~LVM_GETCOLUMN,index%,Column#)
Return Text$
ENDPROC
Cls
Randomize
Var LV& = Create("GridBox",%hwnd,"Test 1;0;90;Test 2;0;90;Test 3;0;90;Test 4;0;90;Test 5;0;90",0,2,100,340,300)
waitinput
WhileLoop 0,4
LV_SetColumn(LV&,(~LVCF_TEXT * Rnd(2)) | ~LVCF_WIDTH,&Loop ,New " + Str $(&Loop + 1),Width(LV&) \ 5)
Wend
Print Trim $(LV_GETCOLUMN(LV&,Rnd(6)))
waitinput
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/06/11 ▲ |
|
|
|