VO'ers.
Simple code... why does DROP() not get called. I drag a file from Explorer, see the ICON with the [ + ] for drag n drop... but drop does not execute.
Have other code that used to work and wonder why now. Yet my Browser drag and drop works. My original code was TEXTcontrol on Dialog window. Tried the STYLE.. tried lots of things. aargh..
Help... has to be something simple
Phil
CLASS MainWindow INHERIT DATAWINDOW
PROTECT oCCEndWindow AS PUSHBUTTON
PROTECT oDCFixedText1 AS FIXEDTEXT
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)
METHOD Drop(oDragEvent) CLASS MainWindow
? "METHOD Drop"
SUPER:Drop(oDragEvent)
? oDragEvent:FileCount
? oDragEvent:FileName(1)
RETURN SELF
METHOD Init(oWindow,iCtlID,oServer,uExtra) CLASS MainWindow
SELF:PreInit(oWindow,iCtlID,oServer,uExtra)
SUPER:Init(oWindow,ResourceID{"MainWindow",_GetInst()},iCtlID)
oCCEndWindow := PushButton{SELF,ResourceID{MAINWINDOW_ENDWINDOW,_GetInst()}} oCCEndWindow:HyperLabel := HyperLabel{#EndWindow,"Close",NULL_STRING,NULL_STRING}
oDCFixedText1 := FixedText{SELF,ResourceID{MAINWINDOW_FIXEDTEXT1,_GetInst()}} oDCFixedText1:HyperLabel := HyperLabel{#FixedText1,"TODO: Add server, controls "+_CHR(38)+_CHR(38)+" event handlers",NULL_STRING,NULL_STRING}
SELF:Caption := "DataWindow Caption"
SELF:HyperLabel := HyperLabel{#MainWindow,"DataWindow Caption",NULL_STRING,NULL_STRING}
SELF:QuitOnClose := TRUE
IF !IsNil(oServer)
SELF:Use(oServer)
ENDIF
SELF:PostInit(oWindow,iCtlID,oServer,uExtra)
RETURN SELF
METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS MainWindow
SELF:EnableDragDropClient(TRUE)
//
// SELF:oDCFixedText1:SetStyle(WS_EX_ACCEPTFILES , TRUE)
// SELF:SetStyle(WS_EX_ACCEPTFILES , TRUE)
//
RETURN SELF
If you run the application from the IDE, the drag/drop does not work!F:PreInit(oWindow,iCtlID,oServer,uExtra)
You need to generate the EXE then run it. It works for me :)
Jamal
On 8/13/2021 8:17 PM, Sherlock wrote:
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 77:33:36 |
Calls: | 6,489 |
Files: | 12,096 |
Messages: | 5,276,381 |