Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design question, for schedule
Message
De
18/02/2009 06:40:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/02/2009 04:46:30
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01382543
Message ID:
01382595
Vues:
21
Thanks; I somehow thought there were only 40 colors. On the other hand, I thought there might be a way of specifying more colors, as an RGB value.

Excel 2003 / Excel 2007: I must assume the same potential limitation; for now I prefer to design for Excel 2003, to be on the safe side.

Course titles / colors: I wanted the list of course titles to also be under user control. Well, perhaps I can give them an option of assigning an initial default color to the course title, and then changing for the individual courses offered. I'll probably have to think a bit more about it - and consult with the end-users.

>Before Excel 2007, you must use an indexed colour, I think there are actually 56 (Including White & Black). Excel 2007 has many more colours, but unfortunately I don't get to use them because many of my clients still have earlier versions.
>
>The following code will create a spreadsheet showing you the 56 colours and their index value:
>
>#define xlSolid                                           1
>loExcel=CREATEOBJECT("Excel.Application")
>loExcel.workbooks.Add()
>loSheet1=loExcel.Workbooks(1).Worksheets.add
>loSheet1.Select()
>FOR lnk=1 TO 56
>  WITH loSheet1
>    lcRow=ALLTRIM(STR(lnk))
>    .Range("A"+lcRow).Value=lnk
>    .Range("B"+lcRow).Interior.ColorIndex = lnk
>    .Range("B"+lcRow).Interior.PATTERN = xlSolid    
>  ENDWITH
>ENDFOR
>loExcel.Visible=.T.
>
>
>Personally I would create a lookup table of course titles and assign colours to those, you could then give them a way of manually amending. don't forget you have both text colour and fill colour.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform