Val(GetEnvironmentVariable("PB_Tool_Scintilla"))

Klar, wenn man als Tool der IDE gestartet wurde, klappt das auchKurzer hat geschrieben:Schade, man kommt mit folgender Methode wohl nicht mehr an das Scintilla handle der PB IDE (getestet mit PB 5.00 unter Win 7):
Val(GetEnvironmentVariable("PB_Tool_Scintilla"))
Code: Alles auswählen
scintilla=Val(GetEnvironmentVariable("PB_Tool_Scintilla"))
If scintilla
SendMessage_(scintilla,2248,2,0) ; 2 (normaler Cursor) oder 7 (reverser Cursor)
EndIf
End
Funktioniert schon, Parameter 3 ist die Marginnummer und erst Parameternummer 4 ist der Cursor. Folgendes Beispiel momentan nur als Scintillagadget und nicht die IDE:Kurzer hat geschrieben:Vermutlich steckt der Teufel wieder mal im Detail.Egal, war nen Versuch.
Code: Alles auswählen
If OpenWindow(0, 0, 0, 320, 90, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If InitScintilla()
ScintillaGadget(0, 10, 10, 300, 70, #Null)
; Output set to red color
ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
; Set the initial text to the ScintillaGadget
ScintillaSendMessage(0, #SCI_SETTEXT, 0, @"This is a simple ScintillaGadget with text...")
; Adding a second line of text with linebreak before
Text$ = Chr(10) + "Second line"
ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), @Text$)
#SCI_SETMARGINCURSORN = 2248
#SC_CURSORARROW = 2
#SC_CURSORREVERSEARROW = 7
ScintillaSendMessage (0, #SCI_SETMARGINCURSORN, 1, #SC_CURSORARROW)
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Code: Alles auswählen
EnableExplicit
#SCI_SETMARGINCURSORN = 2248
#SC_CURSORARROW = 2
;#SC_CURSORREVERSEARROW = 7
Declare Scintilla.i
Scintilla = Val(GetEnvironmentVariable("PB_Tool_Scintilla"))
If Scintilla
SendMessage_(Scintilla, #SCI_SETMARGINCURSORN, 0, #SC_CURSORARROW)
EndIf
End