I saw some very similar threads here, but I couldn’t find solution to my problem.
I take the value from TStringList and use it as pen style (psDot, psSolid and so on), but the compilation fails with Incompatible types: 'TPenStyle' and 'String' error message.
Here is the code:
Image1.Canvas.Pen.Style := myList.ValueFromIndex[j];
How can I convert myList.ValueFromIndex[j] to TPenStyle ?
if stored as psDot, psSolid else you have to adapt
as suggested by David Heffernan