Scintilla not resizing correctly 6.10 LTS
Posted: Tue Apr 09, 2024 8:14 pm
When you resize a scintilla control with a long line of text and scroll the cursor from the beginning of the line to the end, the cursor disappears where the scintilla control's right border was before it was resized.
This might apply to other platforms as well, but I am only using MacOS 13.6.6
Is this a Scintilla bug or a PB bug?
To demonstrate, use the follow program, resize the window and try moving the cursor from beginning to end with the cursor keys. You may have to do it a couple of times before it starts doing it.
This might apply to other platforms as well, but I am only using MacOS 13.6.6
Is this a Scintilla bug or a PB bug?
To demonstrate, use the follow program, resize the window and try moving the cursor from beginning to end with the cursor keys. You may have to do it a couple of times before it starts doing it.
Code: Select all
Procedure mainLoop()
Define event
Define done=#False
Define mnu
Define gadget
While Not done
event=WaitWindowEvent()
Select event
Case #PB_Event_Timer
Case #PB_Event_Gadget
gadget=EventGadget()
Select gadget
;
EndSelect
Case #PB_Event_CloseWindow
done=#True
Case #PB_Event_Menu
mnu=EventMenu()
Select mnu
Case #PB_Menu_Quit
done=#True
EndSelect
EndSelect
Wend
EndProcedure
Procedure callBack(Gadget, *scinotify.SCNotification)
EndProcedure
Procedure.i Sci_SendStr(Gadget.i, Message.i, Param.i, lParam.s)
Protected lBuffer.s = Space(3*Len(lParam))
PokeS(@lBuffer, lParam, -1, #PB_UTF8)
ProcedureReturn (ScintillaSendMessage(Gadget, Message, Param, @lBuffer))
EndProcedure
Procedure handleResize()
Debug "resize"
Define w=WindowWidth(0)
Define h=WindowHeight(0)
ResizeGadget(1,0,0,w,h)
EndProcedure
OpenWindow(0,10,10,300,400,"BOO",#PB_Window_SizeGadget)
ScintillaGadget(1,0,0,300,400,@callback())
Sci_SendStr(1, #SCI_SETTEXT, #Null, "asdfasdf asdfasdf jlkjlk jl asdfasdf lkasdjfl23riouweoriuwoeri qwerqweroiquweroqwieru")
BindEvent(#PB_Event_SizeWindow,@handleResize(),0)
mainloop()