Can't change column headers

Posted by: Larry.mcdermott on 25 May 2020, 2:04 am EST

    • Post Options:
    • Link

    Posted 25 May 2020, 2:04 am EST - Updated 30 September 2022, 4:32 am EST

    Hi, I’ve got a very basic app that I use Spread for. I’d like to change my column headers to make them more readable, simple, right…change background/foreground color, font etc. No luck, not sure how I got in a state where my spread won’t respond to executed code for this type of thing like what what I tried some examples form the forum/web and nothing changes it. How can I change my column header font/back/foreground colors so that they are more readable? Screen shot of current format & spread settings attached. I’m happy to change any format, only real thing I need to retain is the header sort option & prohibiting users from editing data. Thanks for any and all suggestions!

  • Posted 25 May 2020, 8:48 pm EST

    Hi,

    We are investigating over it [ID: 7515] and will get back to you with some information soon.

    Thanks,

    Ruchir

  • Posted 26 May 2020, 4:40 pm EST

    Hello Larry,

    To customize the style for column header along with showing sort indicators in a protected sheet, you should set ColumnHeader.DefaultStyle’s LockBackColor, LockForeColor etc and change the renderer for column header cells.

    Regards.

    Ruchir

    ColumnHeaderStyle_Spread.zip

  • Posted 27 May 2020, 1:09 am EST

    Thank you for the example response, any chance this is available using visual basic? I tried to recreate but it seems like some of the properties aren’t available in VB.

    Thanks for your assistance;

    Larry

  • Posted 27 May 2020, 4:32 pm EST

    Hello Larry,

    Those properties are available in VB as well, as the API is same. You might have missed adding the namespaces through using directive and that’s why not able to use certain properties.

    Anyways, I have attached the corresponding VB sample as well.

    Thanks,

    Ruchir

    CustomColumnHeader_Spread.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels