ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2016-05-11 13:59:47

brian.shankland
Member
Registered: 2016-05-11
Posts: 15

Text style changes

Have been experimenting with ReoGrid in the WPF environment since pre V1 and have just upgraded to V1.2.3.0

One problem I've always been having related to changing the text styles so maybe I've missed something or am just doing it plain wrong.

When I change the font size, or any of its bold / italic / underlined properties I don't see any effect in the sheet

e.g.

CurrentSheet.Ranges[CurrentSelection].Style.FontSize = 11;
CurrentSheet.Ranges[CurrentSelection].Style.Bold = false;

Where CurrentSheet is a Worksheet, and CurrentSelection is a RangePosition.

If I read back the value using

            WorksheetRangeStyle style = CurrentSheet.GetRangeStyles(CurrentSelection);

            ui_FontSize.Text = style.FontSize.ToString();
            ui_FontBold.IsChecked = style.Bold;
            ui_FontItalic.IsChecked = style.Italic;
            ui_FontUnderline.IsChecked = style.Underline;
            ui_FontStrikethrough.IsChecked = style.Strikethrough;

I can see that the values are being changed but visually nothing is being updated.

Is there some additional step required to force a refresh / redraw before the visual effect changes will be shown.

Many thanks in advance.

Offline

#2 2016-05-11 14:42:01

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Text style changes

Hi, I can confirm this problem. The Bold style cannot be removed (set to false) once it get enabled.

This bug will be fixed in next release 1.3.0 soon.

Thanks for reporting!

Offline

#3 2016-05-12 09:40:24

brian.shankland
Member
Registered: 2016-05-11
Posts: 15

Re: Text style changes

Oh, good to know I can carry on with the assumption that it will be okay when we are due to release.

I can confirm the problem with the font size is nothing to do with you, and just became suspicious as it was the same style calls as the bold. i can also change font family name correctly and the vertical / horizontal alignment attributes.

I do see however that setting Italics, Underline or Strikethrough also do not take effect so likely related to the bold clearing. The value can be read-back from the range style but visually there is no difference.

Offline

#4 2016-05-12 09:43:41

brian.shankland
Member
Registered: 2016-05-11
Posts: 15

Re: Text style changes

On a slightly different topic, I found it quite difficult to discover if I was writing the code correctly as there are no examples in the demo relating to font alterations.
Where there are examples for borders etc it would be useful for new users to have a simple example set of controls with combos and toggle buttons to show a text field font properties being changed/reset as it is really a simple task to do but not obvious from documentation.

Thanks.

Offline

#5 2016-05-12 10:49:31

alexeyrlx
Moderator
From: CIS
Registered: 2015-07-14
Posts: 36
Website

Re: Text style changes

Hi, brian.shankland

Thanks. Soon we will make a small video tutorial about this.

Last edited by alexeyrlx (2016-05-12 10:54:01)


My English is perfect! (My version of the English language ;-) )

Offline

#6 2016-05-12 15:14:45

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Text style changes

Thanks brian.shankland! We would like to add videos and to improve the demo project and documents for font styles.

Last edited by Jingwood (2016-05-12 15:15:15)

Offline

#7 2016-05-26 14:28:28

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Text style changes

This problem has been fixed in version 1.3, the download available at https://reogrid.net/download

Document about font usage has been updated: https://reogrid.net/document/style

Thanks for report!

Offline

Board footer

Powered by FluxBB