Code:
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Project name : EditorGadget - SetGadgetColor()
; File Name : EditorGadget - SetGadgetColor.pb
; File version: 1.0.0
; Programming : Bug Demonstrator
; Programmed by : StarBootics
; Date : 06-02-2019
; Last Update : 06-02-2019
; PureBasic code : 5.70 LTS
; Platform : Ubuntu 18.10 (Cosmic Cuttlefish) x86-64
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Bug Description
;
; SetGadgetColor() on an EditorGadget() as an impact on :
;
; 1. selected text background is no longer
; 2. The frist or the last 3 lines are invisible after
; scrolling.
; 3. Scrolling make the content flickering.
;
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If OpenWindow(0, 0, 0, 800, 260, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(0, 5, 5, 390, 250)
EditorGadget(1, 400, 5, 390, 250)
SetGadgetColor(1, #PB_Gadget_FrontColor, RGB(0,0,0))
SetGadgetColor(1, #PB_Gadget_BackColor , RGB(255,255,255))
For a = 0 To 15
AddGadgetItem(0, a, "Ligne "+Str(a))
AddGadgetItem(1, a, "Ligne "+Str(a))
Next
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<