I am trying to learn printing and a couple of articles in Xdev issue 7.4 in 2009 caught my eye.
It uses some old style graphics.
ColorButton is a Canvas
In the TextField.Selchange event there is this if statement
if me.SelTextColor<>ColorButton.graphics.foreColor then
ColorButton.Graphics.ForeColor=me.SelTextColor
ColorButton.Graphics.FillRect(1,1,colorButton.Graphics.Width-2,colorButton.Graphics.Height-2)
end if
The first line has a comparison of SelTextColor to foreColor or updated drawingcolor.
How can I do this comparison in 2022 code?
The next 2 line change colors on the button and should be done in the paint event. Is there another way than having a boolean to change the colors, like some extra event