diffplex icon indicating copy to clipboard operation
diffplex copied to clipboard

No text showing in windows forms

Open beauholland opened this issue 2 years ago • 1 comments

Similar to: https://github.com/mmanela/diffplex/issues/79

screenshot

Visual Studio 2022

Targeting .Net 6.0

Windows Forms

DiffPlex.Wpf 1.3.2

Tried modifying font, fore/back colors - no luck

Tested in another older project targeting .Net 4.6.1 - same behaviour

Repo replicating the issue here: https://github.com/beauholland/diffplexwinformstest

beauholland avatar Nov 01 '22 04:11 beauholland

Finally figured it out.

Default ForeColor is Alpha'd out, set to: Color.FromArgb(0, 0, 0, 0) which is transparent.

Update the ForeColor to:

diffViewer1.ForeColor = Color.FromArgb(255, 0, 0, 0); OR

(0, 0, 0); in properties

Setting the .ForeColor is NOT enough given the other Fore Colors for things like Unchanged, Inserted etc are all set at (0, 0, 0, 0), and are still transparent

Therefore you need to update all the (0, 0, 0, 0) to at least (255, 0, 0, 0) or (0, 0, 0) - no alpha

beauholland avatar Nov 01 '22 08:11 beauholland