| |
|
|
| CompileMarkSeparationSource wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Listbox mit Doppelklick-Auswahl
Doppel - und Rechtsclicklistbox Autor Dieter Zornow
Def GetSysColor(1) !USER32,GetSysColor
SETTRUECOLOR 1
DECLARE ENDE%,LISTBOX&,BUTTON&,text$
WINDOWSTYLE 63
WINDOWTITLE Listbox with doubleclick and rightclick
WINDOW SUB(DIV(%MAXX,2),DIV(640,2)),SUB(DIV(%MAXY,2),DIV(500,2))-640,500
Listbox mit Doppelclick, Autor Dieter Zornow
CLS GETSYSCOLOR(15)
USEFONT MS Sans Serif,13,0,0,0,0
SETDIALOGFONT 1
LISTBOX& = CREATELISTBOX(%HWND,LISTBOX,0013,0020,0402,0362)
BUTTON& = CREATEBUTTON(%HWND,Ende,410,410,70,25)
addstring(listbox&,Dieter)
addstring(listbox&,Zornow)
addstring(listbox&,Century Park Condominium)
addstring(listbox&,Viphavadi Rangsit Road, Soi 22)
addstring(listbox&,10900 Bangkok /Chatuchak)
addstring(listbox&,Thailand)
WHILENOT ENDE%
getmessage anstatt waitinput
If @EQU(%KEY,2)
LET ENDE%= 1
ELSEIF @EQU(%KEY,4)
ELSEIF GETFOCUS(LISTBOX&) LISTBOXABFRAGE
if equ(%lastmessage,515)
let text$=getstring$(listbox&,getcursel(listbox&))
endif
Locate 0,0
print Doppelklick: ,text$;
ELSEIF GETFOCUS(BUTTON&)
LET ENDE%= 1
ENDIF
WEND
/../funcion-referencias/XProfan/end/'>end
|
|
|
| |
|
|
|
Walter | was hocherfreut, that this really functions! me went it around the Double click in a GridBOX.
have another bisschen updated and comments...
' Double click in Grid functions !
' ACHTUNG: getmessage instead of waitinput use
' and any clicked() in this Loop in getfocus() transfiguring
declare hgrid&,s$,end%,b&,m&
Set("TrueColor", 0)
cls RGB(29, 29,29)
' Grid define
s$="a;0;90;b;0;90"
hGrid&=Create("Gridbox", %hwnd, s$,0, 40, 25, 190, 150)
b&=Create("Button", %hwnd,"Ende",40, 250, 70,25)
m&=Create("Text", %hwnd,"",40, 300, 400,25)
'Grid fill
addstring(hGrid&,"Bla1|xxx")
addstring(hGrid&,"Bla2|xxx")
addstring(hGrid&,"Bla3|xxx")
WhileNot end%
getmessage' getmessage instead of waitinput
if %key=2' Closing
end%=1
elseif getfocus(b&)' Button end
end%=1
elseif getfocus(hGrid&)' everywhere getfocus()instead of clicked()
if %lastmessage =515' Double click
if getcursel(hGrid&)>=0
settext m&, "Doppelklick: "+getstring$(hGrid&,getcursel(hGrid&))
else
settext m&, "Außerhalb the valid Lines."
EndIf
endif
endif
endwhile
|
|
|
| |
|
|