Here is the procedure to customize Multiline text box and Multi select box in MOSS 2007.
- To increase the size of Multiline textbox, modify width in .ms-long class.
If you want only modify in one page then add a content editor Webpart in the page and place the following code inside.
.ms-long {WIDTH: 400px}
This will change only in that particular page. If you want this change to apply for the entire portal then modify Core.css file.
- To increase the height and width of Multiple selection list box. Then you have to modify “SPHtmlSelect_Adjust” function in
“C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\GroupedItemPicker.js”.
function SPHtmlSelect_Adjust(oSelect)
{
var oDiv=oSelect.parentNode;
if (oDiv.tagName !="DIV")
return;
if (oSelect.options.length <>
oSelect.size=20;
else
oSelect.size=oSelect.options.length;
var widthDiv=oDiv.clientWidth;
var widthSel=oSelect.offsetWidth;
if (widthSel <>
{
oSelect.style.width=widthDiv+"px";
}
if (oSelect.selectedIndex <>
return;
var pos=Math.round((oSelect.selectedIndex * oDiv.scrollHeight / oSelect.size));
if (pos <>
{
oDiv.scrollTop=pos;
}
else if (pos > Math.round(oDiv.scrollTop+oDiv.clientHeight - (oDiv.scrollHeight / oSelect.size)))
{
oDiv.scrollTop=Math.round(pos - oDiv.clientHeight+(oDiv.scrollHeight / oSelect.size));
}
}
0 comments:
Post a Comment