Using a SysList control on a window in my C10 application. I try to change the font of this SysList control so that it looks like the rest of my other controls. Please see the screenshot.
I tried for example: SysList1.SetFont('Microsoft Sans Serif',12)
But no change of the font and size.
In C6 this works ok btw.
I use this version of SysList in my C10 application:
There you can see the source of SysListClass.SetFont in syslist.clw.
So in my C6 application I can change the font, but in C10 it does nothing at all.
EDIT: I made a small example, which als use SysTree:
I have attached SysListTree-example.zip. Please run VIEWDOCS and select a folder. You can see that the files of the SysList control aren’t displayed in the Consolas font. SysListTree-example.zip (866,1 KB)
No, I hadn’t tested your example but I just did (C11) and compared the properties of the 2 SysList1 (mine and yours) and didn’t find any noticeable difference that would explain why it works in my application and not in yours:
I had a little time at the end of the day and I may have found the reason for the problem you’re having. The SysList control you inserted is embedded as IMAGE whereas when I insert a new SysList control mine is embedded as TEXT.
Prop:buffer?
Transparent property? That affects some clarion controls during a resize which might have an effect.
Theres another prop: which affects screen draws but I cant think what it is at the moment but it can be used in combo with prop:buffer, but it sounds like an event/msg isnt happening when the font resize takes place hence the difference between image and text thats seen.
That makes sense why it doesn’t work. An Image control does not have Font attributes.
If you look inside SysList.clw code .Init() the Font specs come from the container control. The .SetFont() method first changes the container control Prop:Fontxxxx’s which won’t work with an Image.
Thank you Carl for these explanations which make sense. I had found that by replacing IMAGE with TEXT Jeffrey’s code worked well and now I know why. Have a nice Sunday.