× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In the HSSF_H copy module I have the following colors defined:


*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* COLOR constants for calling HSSFCellStyle_setFillBackgroundColor()
* Set background color...
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D BIG_SPOTS...
D C 9
D SOLID_FOREGROUND...
D C 1
D COLOR_BLACK...
D C
8 Additional #s
D COLOR_WHITE...
D C 9
D COLOR_RED...
D C 10
D COLOR_BRIGHT_GREEN...
D C 11
D COLOR_BLUE...
D C
12 39
D COLOR_YELLOW...
D C
13 34
D COLOR_PINK...
D C
14 33
D COLOR_TURQUOISE...
D C
15 35
D COLOR_DARK_RED...
D C
16 37
D COLOR_GREEN...
D C 17
D COLOR_DARK_BLUE...
D C
18 32
D COLOR_DARK_YELLOW...
D C 19
D COLOR_VIOLET...
D C
20 36
D COLOR_TEAL...
D C
21 38
D COLOR_GREY_25_PERCENT...
D C 22
D COLOR_GREY_50_PERCENT...
D C 23
D COLOR_CORNFLOWER_BLUE...
D C 24
D COLOR_MAROON...
D C 25
D COLOR_LEMON_CHIFFON...
D C 26
D COLOR_ORCHID...
D C 28
D COLOR_CORAL...
D C 29
D COLOR_ROYAL_BLUE...
D C 30
D COLOR_LIGHT_CORNFLOWER_BLUE...
D C 31
D COLOR_SKY_BLUE...
D C 40
D COLOR_LIGHT_TURQUOISE...
D C
41 27
D COLOR_LIGHT_GREEN...
D C 42
D COLOR_LIGHT_YELLOW...
D C 43
D COLOR_PALE_BLUE...
D C 44
D COLOR_ROSE...
D C 45
D COLOR_LAVENDER...
D C 46
D COLOR_TAN...
D C 47
D COLOR_LIGHT_BLUE...
D C 48
D COLOR_AQUA...
D C 49
D COLOR_LIME...
D C 50
D COLOR_GOLD...
D C 51
D COLOR_LIGHT_ORANGE...
D C 52
D COLOR_ORANGE...
D C 53
D COLOR_BLUE_GREY...
D C 54
D COLOR_GREY_40_PERCENT...
D C 55
D COLOR_DARK_TEAL...
D C 56
D COLOR_SEA_GREEN...
D C 57
D COLOR_DARK_GREEN...
D C 58
D COLOR_OLIVE_GREEN...
D C 59
D COLOR_BROWN...
D C 60
D COLOR_PLUM...
D C 61
D COLOR_INDIGO...
D C 62
D COLOR_GREY_80_PERCENT...
D C 63




On Mon, Jul 20, 2009 at 11:20 AM, tim <tim2006@xxxxxxxxxxx> wrote:

Gene,

How is COLOR_LIGHT_TURQUOISE defined?


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Gene Burns
Sent: Monday, July 20, 2009 11:51 AM
To: RPG programming on the IBM i / System i
Subject: Re: Poi HSSFCellStyle background color

I also needed to define the new types as follows:

d ShadedTxt s like(HSSFCellStyle)
d ShadedNbr s like(HSSFCellStyle)
d ShadedInt s like(HSSFCellStyle)
d ShadedDate s like(HSSFCellStyle)


On Mon, Jul 20, 2009 at 10:48 AM, Gene Burns <burns.gene@xxxxxxxxx> wrote:

I shaded cells using the HSSFCellStyle_setFillForegroundColor to create a
new data type.


// Create a cell style for shaded text
ShadedTxt = HSSFWorkbook_createCellStyle(book);
HSSFCellStyle_setAlignment(ShadedTxt: ALIGN_CENTER);
HSSFCellStyle_setFillForegroundColor(ShadedTxt:
COLOR_LIGHT_TURQUOISE);
HSSFCellStyle_setFillPattern(ShadedTxt: PATTERN_1);

// Create a cell style for shaded integers
ShadedInt = HSSFWorkbook_createCellStyle(book);

DataFmt = HSSFWorkbook_createDataFormat(book);
TempStr = new_String('###,##0');
NumFmt = HSSFDataFormat_getFormat(DataFmt: TempStr);
HSSFCellStyle_setDataFormat(ShadedInt: NumFmt);
HSSFCellStyle_setFillForegroundColor(ShadedInt:
COLOR_LIGHT_TURQUOISE);
HSSFCellStyle_setFillPattern(ShadedInt: PATTERN_1);

// Create a cell style for shaded numbers
ShadedNbr = HSSFWorkbook_createCellStyle(book);

DataFmt = HSSFWorkbook_createDataFormat(book);
TempStr = new_String('#,##0.00');
NumFmt = HSSFDataFormat_getFormat(DataFmt: TempStr);
HSSFCellStyle_setDataFormat(ShadedNbr: NumFmt);
HSSFCellStyle_setFillForegroundColor(ShadedNbr:
COLOR_LIGHT_TURQUOISE);
HSSFCellStyle_setFillPattern(ShadedNbr: PATTERN_1);

// Create a cell style for shaded dates
ShadedDate = HSSFWorkbook_createCellStyle(book);

DataFmt = HSSFWorkbook_createDataFormat(book);
TempStr = new_String('m/d/yy');
DateFmt = HSSFDataFormat_getFormat(DataFmt: TempStr);
HSSFCellStyle_setFillForegroundColor(ShadedDate:
COLOR_LIGHT_TURQUOISE);
HSSFCellStyle_setFillPattern(ShadedDate: PATTERN_1);
HSSFCellStyle_setDataFormat(ShadedDate: DateFmt);


Then used it in the program like this:

hssf_formula(row: 7: RptPrmForm: ShadedInt);

On Mon, Jul 20, 2009 at 10:36 AM, tim <tim2006@xxxxxxxxxxx> wrote:

I am looking to create a shaded background for a cell used to holding a
total number. I looked at documentation from Scott, but didn't see any
examples of this. Does anyone have such an example?





--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.