ToolBar separators and word wrap

Is there a way to easily add separators between items in a toolbar (without adding my own ImageOnly item)?

Also, is there a way to disable word wrapping for the text of toolbar items?

Thanks,
Terry


3 Replies

RP Rekha P Syncfusion Team October 10, 2008 09:44 AM UTC

Hi Terry,

Thank you for your interest in Syncfusion Products.

Without using image for separators in ToolBar, we can give Text="|" in item collections like,


The ToolBarItems can be disabled by specifying the property Disabled="True", please refer the below code snippet,





or in code behind,

ToolBar1.Items[2].Disabled = true;


or using clientside event,
ClientSideOnItemSelect="ItemSelect(this)" ClientObjectId="ToolBar1ClientObj" >








and in javascript
function ItemSelect(oData)
{
ToolBar1ClientObj.SetDisabled(oData.HtmlID, true);
}

Also please refer the below link for online sample which illustrates the above two conditions and the sample files can be downloaded from 'Download source',
http://websamples.syncfusion.com/samples/Tools.Web/6.3.1.8/77044-ToolBar/main.htm

Please let me know if this sample helps you.

Thanks,
Rekha



TF Terry Foster October 10, 2008 05:32 PM UTC

Thank you for the response. For the second question, I was really asking how it's possible to disable *word wrapping* for text in a toolbar item, not disable the toolbar item itself. For example, if I have a toolbar item that says "Add New", by default it is being rendered as:

Add
New

which is not what I would expect or hope for.

Thanks,
Terry



RP Rekha P Syncfusion Team October 13, 2008 04:02 AM UTC

Hi Terry,

The property 'TextWrap' is used to make word wrapping for a text in a ToolBar item. Please refer the below code snippet to achieve this,


and it can be disabled using Disabled="True".

Hope this code helps you and please let me know if you have any concerns.

Thanks,
Rekha


Loader.
Up arrow icon