Seite 1 von 1

ScintillaGadget: Drag and Drop?

Verfasst: 09.07.2014 11:48
von Kiffi
Hallo,

lt. Dokumentation unterstützt das ScintillaGadget momentan kein Drag & Drop:
The following events are supported through EventType():
#PB_EventType_RightClick
Demnach funktioniert folgender Code auch nicht wie gewünscht:

Code: Alles auswählen

#Window = 0
#Scintilla = 0

If OpenWindow(#Window, 0, 0, 320, 90, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	EnableWindowDrop(#Window, #PB_Drop_Files, #PB_Drag_Copy)
	If InitScintilla()
		ScintillaGadget(#Scintilla, 10, 10, 300, 70, 0)
		EnableGadgetDrop(#Scintilla, #PB_Drop_Files, #PB_Drag_Copy)
		Repeat 
			WWE = WaitWindowEvent()
			Select WWE
				Case #PB_Event_Gadget
					Select EventGadget()
						Case #Scintilla
							Select EventType()
								Case #PB_EventType_DragStart
									Debug "#PB_EventType_DragStart"
							EndSelect
					EndSelect
			EndSelect
		Until WWE = #PB_Event_CloseWindow
	EndIf
EndIf
Gibt es dennoch eine Möglichkeit, D&D für das Gadget zu realisieren?

Danke im voraus & Grüße ... Kiffi

Re: ScintillaGadget: Drag and Drop?

Verfasst: 09.07.2014 13:56
von edel
Was genau sollte der Code denn machen? Einfach eine Datei auf das Fenster ziehen und fertig?

Re: ScintillaGadget: Drag and Drop?

Verfasst: 09.07.2014 15:13
von Kiffi
edel hat geschrieben:Was genau sollte der Code denn machen? Einfach eine Datei auf das Fenster ziehen und fertig?
japp. Ich möchte gerne mitbekommen, dass eine Datei auf das Gadget gedroppt wurde, damit ich sie dann laden kann.

Grüße ... Kiffi

Re: ScintillaGadget: Drag and Drop?

Verfasst: 09.07.2014 15:14
von edel

Code: Alles auswählen

#Window = 0
#Scintilla = 0


If OpenWindow(#Window, 0, 0, 320, 90, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  
  If InitScintilla()
    ScintillaGadget(#Scintilla, 10, 10, 300, 70, 0)
    EnableGadgetDrop(#Scintilla, #PB_Drop_Files, #PB_Drag_Copy)
    
    Repeat 
      WWE = WaitWindowEvent()
      Select WWE
        Case #PB_Event_GadgetDrop          
          Debug EventDropFiles()          
      EndSelect
    Until WWE = #PB_Event_CloseWindow
    
  EndIf
  
EndIf

Re: ScintillaGadget: Drag and Drop?

Verfasst: 09.07.2014 15:32
von Kiffi
öhm..., ok..., doch so einfach? :oops: :lol:

Danke! :allright: