I’m a bit confused. It’s probably doc’ed somewhere, but I haven’t been able to find it.
How does the Grid know to get a particular image to use as a column header background to show state (default, hover, clicked, sorted)?
In the Feature Explorer examples I don’t see any references to image paths; the skin CSS files don’t reference images; the load_skin.js file only references one image that I see; and the example source doesn’t specify images either.
So how does it know? Or rather, how do I tell it what image to use or to not use an image at all without generating a 404?
Thanks,
JT
Hi JTinCA,
Actually the SmartClient load_skin.js file contains this:
isc.ListGrid.changeDefaults("headerDefaults", {
buttonConstructor : "StretchImgButton"
})
isc.ListGrid.changeDefaults("headerButtonDefaults", {
capSize:5, // scaling down from 12; using GIFs
titleStyle:"headerTitle", // text styling and offset only; no bgcolor
// baseStyle is auto-assigned from headerBaseStyle
src:"[SKIN]ListGrid/header.gif"
})
This sets the header up to draw its buttons as StretchImgButton instances, and sets the “src” property to use header.gif.
If you look at the StretchImgButton documentation, you can see that it will derive its background image from its src attribute, appending suffixes for the various ‘over’ / ‘down’ / ‘selected’ etc states. You can disable these suffixes by changing ‘showRollOver’ / ‘showDown’ etc to false. You can use the ‘headerButtonDefaults’ block to set these properties on the header buttons.
So this isn’t magic, but we’re aware the documentation is a little thin in this area in the 5.6 release. We’ll be improving this in future releases.
Let us know if you run into difficulties
Thanks
Isomorphic Software