ComponentOne WebMenus and WebBars for ASP.NET: Defining the GroupStyle and ItemStyle Classes > Unique ItemStyle Properties > ImageTextSpacing Property

ImageTextSpacing Property

The ImageTextSpacing property gets or sets the distance between the item image and the item's text. This property is only effective when there is an image in the item's text. Therefore, the ImageTextSpacing property must be set to an image.

This example applies the ImageTextSpacing to the items and makes 30 pixels between the item's image and the item's text.

      Visual Basic

topicbar.ItemStyle.BorderWidth = Unit.Pixel(1)

'assign the ImageUrl property to the ItemStyle

topicbar.ItemStyle.ImageUrl = "~/Images/house.gif"

'assign the ImageTextSpacing to the ItemStyle object

topicbar.ItemStyle.ImageTextSpacing = Unit.Pixel(30)

      C#

topicbar.ItemStyle.BorderWidth = Unit.Pixel(1);

//assign the ImageUrl property to the ItemStyle

topicbar.ItemStyle.ImageUrl = "~/Images/house.gif"

//assign the ImageTextSpacing to the ItemStyle object

topicbar.ItemStyle.ImageTextSpacing = Unit.Pixel(30)

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2009 ComponentOne LLC. All rights reserved.