Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 18 AUG 2023 06:55:53PM Barry Stevens wrote:

Tried this to change the text in the header to red.

Did not work.

How do I do it?

Red = red<1,1,13> =255 red<1,1,14> =0 red<1,1,15> =0 void =set_property(WeekTable$, "HEADER.Font", 1, Red) </QUOTE> —- === At 18 AUG 2023 07:04PM Andrew McAuley wrote: === <QUOTE> <QUOTE>Tried this to change the text in the header to red. Did not work. How do I do it? Red =

red<1,1,13> =255

red<1,1,14> =0

red<1,1,15> =0

void =set_property(WeekTable$, "HEADER.Font", 1, Red)

I don’t know the answer and I can’t test the theory but…

Have you tried passing a complete font definition? (Get_property first)

And

If you don’t want the results of a set_property (void) then use set_property_only as it avoids the unnecessary implicit get_property.

The Sprezzatura Group

The Sprezzatura Blog

World leaders in all things RevSoft

</QUOTE>


At 18 AUG 2023 11:02PM Barry Stevens wrote:

Tried this to change the text in the header to red.

Did not work.

How do I do it?

Red = red<1,1,13> =255 red<1,1,14> =0 red<1,1,15> =0 void =set_property(WeekTable$, "HEADER.Font", 1, Red)</QUOTE> I don’t know the answer and I can’t test the theory but… Have you tried passing a complete font definition? (Get_property first) And If you don’t want the results of a set_property (void) then use set_property_only as it avoids the unnecessary implicit get_property. The Sprezzatura Group The Sprezzatura Blog World leaders in all things RevSoft </QUOTE> Thanks Andrew, that was my next goto. Hope your business trip is goinf well!! </QUOTE> —- === At 18 AUG 2023 11:04PM Barry Stevens wrote: === <QUOTE> <QUOTE> <QUOTE> <QUOTE>Tried this to change the text in the header to red. Did not work. How do I do it? Red =

red<1,1,13> =255

red<1,1,14> =0

red<1,1,15> =0

void =set_property(WeekTable$, "HEADER.Font", 1, Red)

I don’t know the answer and I can’t test the theory but…

Have you tried passing a complete font definition? (Get_property first)

And

If you don’t want the results of a set_property (void) then use set_property_only as it avoids the unnecessary implicit get_property.

The Sprezzatura Group

The Sprezzatura Blog

World leaders in all things RevSoft

Thanks Andrew, that was my next goto.

Hope your business trip is goinf well!!

*going

</QUOTE>


At 19 AUG 2023 06:07AM Carl Pates wrote:

You can use the COLUMNS sub-object CELLSTYLE method:

    currStyle = exec_Method( ctrlEntID, "CELLSTYLE", colNo, stateID, bHeader )

    prevStyle = exec_Method( ctrlEntID, "CELLSTYLE", colNo, stateID, bHeader, newStyle )

A cellstyle is a dynamic array of styling information that is applied to a state, such as Selected, Disabled an so on, as defined in PS_EDITTABLE_EQUATES:

   // CELLSTYLE equates

   //

   // A column, row or cell can have a style applied to it that is used for

   // a specific state (this applies to header cells as well)

   // 

   // The states that can have a style applied are:

   //

   //    Normal

   //    Hot

   //    Disabled

   //    Selected

   //    HotSelected

   //    SelectedNoFocus

   //    Current

   

   equ PS_EDT_CS_NORMAL$                         to 0

   equ PS_EDT_CS_HOT$                            to 1

   equ PS_EDT_CS_DISABLED$                       to 2

   equ PS_EDT_CS_SELECTED$                       to 3

   equ PS_EDT_CS_HOTSELECTED$                    to 4

   equ PS_EDT_CS_SELNOFOCUS$                     to 5

   equ PS_EDT_CS_CURRENT$                        to 6

   

   // The styling that can be applied for a state is defined by the 

   // following structure:

   // 

   // <1> ForeColor                 (COLORREF)

   // <2> BackColor From            (COLORREF)

   // <3> BackColor To              (COLORREF)

   // <4> Bold                      TRUE$/FALSE$

   // <5> Italic                    TRUE$/FALSE$

   // <6> Underline                 TRUE$/FALSE$

   // <7> Translucency              (0-100) 

   // <8> GlyphIndex                (>=0)

   

   equ PS_EDT_CS_POS_FORECOLOR$                  to 1

   equ PS_EDT_CS_POS_BACKCOLORFROM$              to 2

   equ PS_EDT_CS_POS_BACKCOLORTO$                to 3

   equ PS_EDT_CS_POS_BOLD$                       to 4

   equ PS_EDT_CS_POS_ITALIC$                     to 5

   equ PS_EDT_CS_POS_UNDERLINE$                  to 6

   equ PS_EDT_CS_POS_TRANSLUCENCY$               to 7

   equ PS_EDT_CS_POS_GLYPHINDEX$                 to 8

So to set the header text for column 1 to Red you would do something like this:

   cs = ""

   cs<PS_EDT_CS_POS_FORECOLOR$> = RED$

   bHdr = TRUE$

   call exec_Method( WeekTable$ : ".COLUMNS", "CELLSTYLE", 1, PS_EDT_CS_NORMAL$, bHdr, cs )

Carl Pates


At 19 AUG 2023 05:12PM Barry Stevens wrote:

You can use the COLUMNS sub-object CELLSTYLE method:

    currStyle = exec_Method( ctrlEntID, "CELLSTYLE", colNo, stateID, bHeader )

    prevStyle = exec_Method( ctrlEntID, "CELLSTYLE", colNo, stateID, bHeader, newStyle )

A cellstyle is a dynamic array of styling information that is applied to a state, such as Selected, Disabled an so on, as defined in PS_EDITTABLE_EQUATES:

   // CELLSTYLE equates

   //

   // A column, row or cell can have a style applied to it that is used for

   // a specific state (this applies to header cells as well)

   // 

   // The states that can have a style applied are:

   //

   //    Normal

   //    Hot

   //    Disabled

   //    Selected

   //    HotSelected

   //    SelectedNoFocus

   //    Current

   

   equ PS_EDT_CS_NORMAL$                         to 0

   equ PS_EDT_CS_HOT$                            to 1

   equ PS_EDT_CS_DISABLED$                       to 2

   equ PS_EDT_CS_SELECTED$                       to 3

   equ PS_EDT_CS_HOTSELECTED$                    to 4

   equ PS_EDT_CS_SELNOFOCUS$                     to 5

   equ PS_EDT_CS_CURRENT$                        to 6

   

   // The styling that can be applied for a state is defined by the 

   // following structure:

   // 

   // <1> ForeColor                 (COLORREF)

   // <2> BackColor From            (COLORREF)

   // <3> BackColor To              (COLORREF)

   // <4> Bold                      TRUE$/FALSE$

   // <5> Italic                    TRUE$/FALSE$

   // <6> Underline                 TRUE$/FALSE$

   // <7> Translucency              (0-100) 

   // <8> GlyphIndex                (>=0)

   

   equ PS_EDT_CS_POS_FORECOLOR$                  to 1

   equ PS_EDT_CS_POS_BACKCOLORFROM$              to 2

   equ PS_EDT_CS_POS_BACKCOLORTO$                to 3

   equ PS_EDT_CS_POS_BOLD$                       to 4

   equ PS_EDT_CS_POS_ITALIC$                     to 5

   equ PS_EDT_CS_POS_UNDERLINE$                  to 6

   equ PS_EDT_CS_POS_TRANSLUCENCY$               to 7

   equ PS_EDT_CS_POS_GLYPHINDEX$                 to 8

So to set the header text for column 1 to Red you would do something like this:

   cs = ""

   cs<PS_EDT_CS_POS_FORECOLOR$> = RED$

   bHdr = TRUE$

   call exec_Method( WeekTable$ : ".COLUMNS", "CELLSTYLE", 1, PS_EDT_CS_NORMAL$, bHdr, cs )

Carl Pates

Great thanks.

Where should I have found the documentation on this?


At 19 AUG 2023 06:29PM Barry Stevens wrote:

  • third_party_content/community/commentary/forums_works/09c0df11bbf4ef4eb262ca79867514e6.txt
  • Last modified: 2024/12/10 16:16
  • by 127.0.0.1