[5.30b9 Mac] PureBasic bug or Scintilla bug?

Mac OSX specific forum
User avatar
kenmo
Addict
Addict
Posts: 2081
Joined: Tue Dec 23, 2003 3:54 am

[5.30b9 Mac] PureBasic bug or Scintilla bug?

Post by kenmo »

On Mac, the startup draw behavior of a ScintillaGadget seems to have changed between PB 5.22 and PB 5.30 beta 9.

On PB 5.22 LTS, this example code correctly opens a window with 3 Scintillas with 3 different background colors.

On PB 5.30b9, the colored Scintillas have a large blank white area that cannot be clicked!

(I know the Scintilla version was updated with PB 5.30, but I wonder if this is a PB bug because it is similar to this fixed IDE bug: http://www.purebasic.fr/english/viewtop ... 24&t=59508 )

PS. Seems to be changed by #SCI_SETSCROLLWIDTH ... maybe a Scintilla bug??

Code: Select all

CompilerIf (#PB_Compiler_OS <> #PB_OS_MacOS)
  CompilerError "This is a bug report on MAC"
CompilerEndIf

InitScintilla()

OpenWindow(0, 0, 0, 480, 480, "", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)

ScintillaGadget(0, 0, 0, WindowWidth(0), WindowHeight(0)/3, #Null)
  ScintillaSendMessage(0, #SCI_STYLESETBACK, #STYLE_DEFAULT, $C0C0FF)
  ScintillaSendMessage(0, #SCI_STYLECLEARALL)
  ScintillaSendMessage(0, #SCI_SETSCROLLWIDTH, 10)
  ScintillaSendMessage(0, #SCI_SETTEXT, 0, @"Scintilla")

ScintillaGadget(1, 0, WindowHeight(0)/3, WindowWidth(0), WindowHeight(0)/3, #Null)
  ScintillaSendMessage(1, #SCI_STYLESETBACK, #STYLE_DEFAULT, $C0FFC0)
  ScintillaSendMessage(1, #SCI_STYLECLEARALL)
  ScintillaSendMessage(1, #SCI_SETSCROLLWIDTH, 50)
  ScintillaSendMessage(1, #SCI_SETTEXT, 0, @"Hello World")

ScintillaGadget(2, 0, WindowHeight(0)*2/3, WindowWidth(0), WindowHeight(0)/3, #Null)
  ScintillaSendMessage(2, #SCI_STYLESETBACK, #STYLE_DEFAULT, $FFC0C0)
  ScintillaSendMessage(2, #SCI_STYLECLEARALL)
  ScintillaSendMessage(2, #SCI_SETSCROLLWIDTH, 100)
  ScintillaSendMessage(2, #SCI_SETTEXT, 0, @"Why does SCROLLWIDTH affect background now?")

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.30b9 Mac] PureBasic bug or Scintilla bug?

Post by Fred »

Yes, the support of #SCI_SETSCROLLWIDTH seems broken in new OS X version of Scintilla, the best for now is to remove this call alltogether, as new OS X doens't display the scrollbar anymore, so it won't change a thing. I don't think we can fix it, so I will move the report.
User avatar
kenmo
Addict
Addict
Posts: 2081
Joined: Tue Dec 23, 2003 3:54 am

Re: [5.30b9 Mac] PureBasic bug or Scintilla bug?

Post by kenmo »

OK thanks for the info Fred. I will play around with the Scintilla SCROLL functions and see what I can do, or maybe just remove it.
Post Reply