Lives: 30

CSS Usage

This post has 1 reply

Not Ranked
Posts: 5
giovannip Posted: Wed Jun 15, 2005 @ 2:35 PM
Hi,

I am fairly new to the ComponentArt suite (1 week) and have the following questions:

1. When should one use CSS? For example, to specify the Office 2003 background-image, can I use the Menu builder component and point to my image or do I have to use CSS to specify the background-image:url(back.gif)? In other words, what can be accomplished without using CSS and when is CSS required. Why is there a split and a need to use the MenuBuilder partially and CSS partially. How does one differentiate when to use and what?

2. On a conceptual level, I am having a hard distinguishing between what is an ItemLook and the usage of CSS classes (.MenuGroup, etc...). Must I use them in conjunction.

3. Can the MenuBuilder encapsulate everything that a .CSS class can thus avoiding CSS?

Having a hard time getting used to the concepts.
Top 10 Contributor
Posts: 4,573
stephen Posted: Thu Jun 16, 2005 @ 12:32 PM
Like any product, there is definitely a bit of a learning curve with ours. I can say that, in my epxerience, the best source we have for learning are the locally installed samples, as they include full source code. Thus you can easily see how we accomplished certain designs.

It seems that most of your conceptual problem surround looks and their usage. Basically, think of a look as just that: a possible look for an item, including its over and hover states and any images. This look is defined in the control, but uses css for its appearance. Thus, you might have a look like:

<ItemLook ID="myLook" CssClass="myClass" HoverCssClass="myHoverClass" ... />

myClass and myHoverClass are simply two css classes defined in your stylesheet. You then use this look where appropriate- for example, if this look only applies to one item, you would set that items LookId property:

<Item Text="my item" LookId="myLook" />

Or, you could set it to one of the default settings:

<CA:Menu DefaultItemLookId="myLook" ... />

While there are a few styles that can be applied without looks, you'll definitely need to use them in some scenarios.

Again, I'd highly reccomend you spend a bit of time with the local samples- design ones in particular can be extremely helpful when learning look concepts and usage.

I hope this helps.
Stephen Hatcher, Developer Support Manager
Page 1 of 1 (2 items)

Copyright © 2010 ComponentArt, Inc. All rights reserved.