Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 17

Changing DHTML Element Style

The Style object is a property of all DHTML objects except for the Document object. It contains over 80 properties that enable you to manipulate the appearance of an element. Following is a brief sampling of those 80+ properties:

  • BorderColor is a string like the string used for the Color property.

  • BorderStyle is a string whose possible values are "none," "solid," "double," "groove," "ridge," "inset," and "outset."

  • Color is a string whose format is either one of the accepted color descriptions for the browser (examples would be "black," "red," "yellow," "slategray," and many others for an IE environment) or strings representing a hex number (examples would be "#FF0000" for pure red, "#00FF00" for pure green, "#0000FF" for pure blue, and "#FF00FF" for purple).

  • FontFamily is a string giving the name of a valid system font group. Some possible values are "serif," "cursive," and "sansserif."

  • Visibility is a string indicating visibility of the object, and its most common possible values are "hidden" and "visible" (a third value, "inherited," works if the object is the child of another object).

As you can see from the preceding brief list, Style properties having the same names or similar names to properties of standard VB controls usually don’t work in exactly the same way. VB constants that you may be used to assigning to standard control properties won’t work here.


  

<< Previous | Contents | Next (Chapter 18) >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved