Hello,
I am using an UltraGrid. The Ultragrid has some rows and some columns.At the UltraGrid's bottom I am showing a summary.
Beside the UltraGrid I am showing some Grid informations.Two of the informations are the summary's backcolor and forecolor.The colors are not set expicitly so they have their default values.I am getting the colors by using the following property:
MyUltraGrid.DisplayLayout.Bands(0).Summaries("MySummary").Appearance.BackColorMyUltraGrid.DisplayLayout.Bands(0).Summaries("MySummary").Appearance.ForeColor
Both properties return en empty color: {Name=0, ARGB=(0, 0, 0, 0)}
But the summary's backcolor is a gray shade (I think LightGrey) and the forecolor is black.These are the default colors of any summary. But using their properties you can only get the empty colors.So my question is how can I determine which are the real default colors because they are obviously not empty.
Well, if you are not using AppStylist, then you know what the default colors are based on which properties (if any) you are applying to the grid.
The ultimate defaults in that case are system colors like SystemColors.Window and SystemColors.WindowText.
There is no reasonable way to resolve the appearance of a cell without a cell (or at least a row) object.
The unreasonable way, just in case you are curious, would be to buy a NetAdvantage subscription that includes the source code and then try to duplicate the entire resolution logic of the grid and examine every UIRole and Appearance that could possibly have an effect on the cell and account for everything in exactly the same order.
Or, you could just add a row to the grid, get the appearance, then remove the row.
what can I do if I have a band with zero rows? In such a case I can't resolve an appearance because there isn't an object which I can use. The columns CellAppearance Property contains only default values.
I need a way to determine the real cell appearance values that a cell would have before I add a real existing row which appears on the screen. The UltraGrid internally knows which colors to show when a backcolor is set to default. I would like to know it too... ;)
isiraider said: So if a grid object (cell, header, summary etc...) doesn't have an explicit FontData object the Grid.Font property contains the font informations which are used to display the object on screen? This would be enough for me. So I could check the object's HasFontData property. If it returns true I would get the informations from it else I would take the grid's font property to determine the informations I need. Please tell me if this is right. Thank you once more!
So if a grid object (cell, header, summary etc...) doesn't have an explicit FontData object the Grid.Font property contains the font informations which are used to display the object on screen?
This would be enough for me. So I could check the object's HasFontData property. If it returns true I would get the informations from it else I would take the grid's font property to determine the informations I need.
Please tell me if this is right. Thank you once more!
Yes, if the AppearanceData.FontData comes back empty, then the grid will use the grid.Font property.