Board index » delphi » TreeView.Font.Style:=[fsBold] // This Don't Work - Please Help

TreeView.Font.Style:=[fsBold] // This Don't Work - Please Help

Hi there,

I'm reasonably new to Delphi - but having managed to master the use of
TreeViews I seem to have hit on a bit of a problem when setting something as
simple as the font styles!

I am using Delphi 2.01 and the code I'm trying to execute is as follows...

    TreeView1.Font.Style:=[fsBold];

When I try and compile this, I get the following error...

    Could Not Compile ;    Ordinal Type Required

If I change the line to read...

    TreeView1.Font.Style:=[fsUnderline];

Everything compiles OK

Am I doing something stupid, is it a bug and / or is there a workaround for
this?

Best regards,

Jon Souter

 

Re:TreeView.Font.Style:=[fsBold] // This Don't Work - Please Help


Try using

TreeView.Font.Style := [Graphics.fsBold];

Rich....

Quote
MoonJoose wrote in message <6n8rnl$4t...@soap.news.pipex.net>...
>Hi there,

>I'm reasonably new to Delphi - but having managed to master the use of
>TreeViews I seem to have hit on a bit of a problem when setting something
as
>simple as the font styles!

>I am using Delphi 2.01 and the code I'm trying to execute is as follows...

>    TreeView1.Font.Style:=[fsBold];

>When I try and compile this, I get the following error...

>    Could Not Compile ;    Ordinal Type Required

>If I change the line to read...

>    TreeView1.Font.Style:=[fsUnderline];

>Everything compiles OK

>Am I doing something stupid, is it a bug and / or is there a workaround for
>this?

>Best regards,

>Jon Souter

Other Threads