Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #13412 > unrolled thread

Drag n Drop... was working and not now... why

Started bySherlock <sherlock@sherlock.com.au>
First post2021-08-13 17:17 -0700
Last post2021-08-14 04:02 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Drag n Drop... was working and not now... why Sherlock <sherlock@sherlock.com.au> - 2021-08-13 17:17 -0700
    Re: Drag n Drop... was working and not now... why Jamal <nospam@example.com> - 2021-08-14 00:40 -0400
      Re: Drag n Drop... was working and not now... why Phil McGuinness <sherlocksoftware@gmail.com> - 2021-08-14 04:02 -0700

#13412 — Drag n Drop... was working and not now... why

FromSherlock <sherlock@sherlock.com.au>
Date2021-08-13 17:17 -0700
SubjectDrag n Drop... was working and not now... why
Message-ID<7868d6b6-df60-4c64-9d88-097012f1c119n@googlegroups.com>
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         

[toc] | [next] | [standalone]


#13413

FromJamal <nospam@example.com>
Date2021-08-14 00:40 -0400
Message-ID<sf7hfi$th$1@gioia.aioe.org>
In reply to#13412
If you run the application from the IDE, the drag/drop does not work! 
You need to generate the EXE then run it. It works for me :)

Jamal

On 8/13/2021 8:17 PM, Sherlock wrote:
> 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
> 

[toc] | [prev] | [next] | [standalone]


#13414

FromPhil McGuinness <sherlocksoftware@gmail.com>
Date2021-08-14 04:02 -0700
Message-ID<eff96b3d-c5bd-4f73-93ef-19713dead47dn@googlegroups.com>
In reply to#13413
Jamal

Was not aware of this and answer also in XSHARP group.
So my code that did not work, did actually work but not in IDE.
Wasted few hours there.. but at least I know.

Irony is the Drag n Drop to bBrowser does work in IDE.

Phil

On Saturday, August 14, 2021 at 2:40:19 PM UTC+10, Jamal wrote:
> If you run the application from the IDE, the drag/drop does not work! 
> You need to generate the EXE then run it. It works for me :) 
> 
> Jamal
> On 8/13/2021 8:17 PM, Sherlock wrote: 
F:PreInit(oWindow,iCtlID,oServer,uExtra) 
> > 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web