| |
|
|
Matthias Arlt |
'it'll not the standardmäßige Inplace-editor list view used.
'this would only for first slot available stand...
'Original-Source Thomas suitor - modifiziert Matthias Arlt
Window 0,0 - 600,410
declare LV&,Spalte&,Zeile&,Item&,Edit&,Font&,Txt$
declare rect#,cellpos_x%,cellpos_y%,cellwidth%,cellheight%
Font&=CreateFont("Verdana",16,0,0,0,0)
SetDialogFont Font&
LV&=Create("GridBox",%hwnd,"Spalte 1;1;60;Spalte 2;1;120;Spalte 3;1;80;Spalte 4;1;80;Spalte 5;1;80",0,10,10,460,250)
SetFont LV&,Font&
whileloop 0,20
Addstring(LV&,st$(&loop) + "|0|0|0|0")
wend
Edit& = create("Edit",LV&,"",0,0,0,0)
setfont Edit&,Font&
proc SetSubItemEdit
dim rect#,16
SendMessage(LV&,$100E,Zeile&,rect#)'LVM_GETITEMRECT
cellpos_x% = long(rect#,0)
cellpos_y% = long(rect#,4) - 1
cellwidth% = sendmessage(LV&,$101D,Spalte&,0)
cellheight% = (long(rect#,12) - long(rect#,4)) + 1
if Spalte& > 0
whileloop 0,(Spalte& - 1),1
cellpos_x% = cellpos_x% + sendmessage(LV&,$101D,&loop,0)
wend
endif
dispose rect#
settext Edit&, Txt$
setwindowpos Edit& = cellpos_x%,cellpos_y% - cellwidth%,cellheight%
setfocus(Edit&)
'SendMessage(Edit&,"+({END})") 'Cursor ans end settle...
SendMessage(Edit&,$B1,0,-1)'or everything Mark... (Explorer-konform)
endproc
WAY from 13, 13, 0
WAY from 37, 37, 0
WAY from 38, 38, 0
WAY from 39, 39, 0
WAY from 40, 40, 0
SubClass %hwnd, 1
usermessages 2000
SubClassProc
if SubClassMessage(%hwnd, 78)'WM_NOTIFY
if (Long(&sLParam,8) = -3)
Item&=Long(&sLParam,12)
if (Item& <> -1)
SendMessage(%hwnd,2000,Item&,Long(&sLParam,16))
endif
elseif (Long(&sLParam,8) = -180)'LVN_BEGINSCROLL
settext LV&,Zeile&,Spalte&,gettext$(Edit&)
setwindowpos Edit& = 0,0-0,0
endif
endif
endproc
while 1
waitinput
if (%umessage = 2000)
Txt$ = GetText$(LV&,&uwparam,&ulparam)
Spalte&= &ulparam
Zeile&= &uwparam
SetSubItemEdit
while getfocus(Edit&)
waitinput
if (%menuitem = 13)
break
elseif (%menuitem = 37) | (%menuitem = 38) | (%menuitem = 39) | (%menuitem = 40)
settext LV&,Zeile&,Spalte&,gettext$(Edit&)
case (%menuitem = 37) : Spalte& = (Spalte& - 1)
case (%menuitem = 38) : Zeile& = (Zeile& - 1)
case (%menuitem = 39) : Spalte& = (Spalte& + 1)
case (%menuitem = 40) : Zeile& = (Zeile& + 1)
Txt$ = GetText$(LV&,Zeile&,Spalte&)
SetSubItemEdit
endif
wend
settext LV&,Zeile&,Spalte&,gettext$(Edit&)
setwindowpos Edit& = 0,0-0,0
setfocus(%hwnd)
endif
wend
usermessages 0
SubClass %hwnd, 0
end
|
|
|
| WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia | 11/02/16 ▲ |
|
|
|
|
Ernst | a crux has The story, if the Scroll bar in that game comes - the Edit-area or. the Cursor can not mitscrollen.
z.B.: one Subitem in the third row becomes doubleclicked -> Edit erscheint; at hinaufscrollen circa a row sees to the Erscheinungsbild the Edits in the second and the Cursor under in the third row. with the input becomes in the third row under the Edit written (apparently) - at Click on one other Subitem becomes the Text into really right Subitem (second row) übernommen. |
|
|
| |
|
|
|
Matthias Arlt | really should the Edit standardmäßig Yes not at all mitscrollen (in the Explorer does it the indeed not...). I habs again revised. so ought to now the gewohnte behaviour manufactured his.
and the Vollständigkeit halber the whole yet something optimiert and same yet with Weiterschaltung through Pfeiltasten...
I have the time into code-Box in the Eingangsbeitrag moved. finally power it none sense, there whom not yet fehlerbereinigten Source stand To let. the goes go ahead Lasten the Übersichtlichkeit. See means moreover supra...
Greeting Matthias |
|
|
| WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia | 01/11/17 ▲ |
|
|
|