Page 1 of 1

CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap

Posted: Sun Feb 02, 2025 1:48 pm
by Sicro

Code: Select all

; PureBasic 6.20 Beta 4 (x64) - Linux
; gtk3: bug
; gtk2 and qt: no bug

#Window = 0
#EditorGadget = 0

If Not OpenWindow(#Window, 0, 0, 500, 500, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  Debug "Error: OpenWindow()"
  End
EndIf

; Without the flag '#PB_Editor_WordWrap', it works.
EditorGadget(#EditorGadget, 0, 0, WindowWidth(#Window), WindowHeight(#Window), #PB_Editor_WordWrap)
;EditorGadget(0, 0, 0, WindowWidth(0), WindowHeight(0))

AddGadgetItem(#EditorGadget, -1, "item text")

Debug CountGadgetItems(#EditorGadget) ; Returns: 9

Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow

Re: CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap

Posted: Sun Feb 02, 2025 5:06 pm
by mk-soft
Linux Version ?

For me ... Count 1
OS: Mint Linux LMDE 6
PB: v6.20 Beta 4

Re: CountGadgetItems(#EditorGadget) with #PB_Editor_WordWrap

Posted: Sun Feb 02, 2025 5:46 pm
by Sicro
I have now tested it with the various packages for Linux.
PureBasic 6.20 Beta 4 for Linux (Ubuntu 18.04 - x64) wrote: 9
PureBasic 6.20 Beta 4 for Linux (Ubuntu 20.04 or 22.04 - x64) wrote: 9
PureBasic 6.20 Beta 4 for Linux (Ubuntu 24.04 - x64) wrote: 9
All tested with gtk3 (default) in Manjaro Xfce x64.