.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

How to align text to top position on Ribbon buttons?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :SharePoint
Hello SharePoint Experts, I have a custom masterpage which is derived from v4.master and it uses the default SP Foundation 2010 Ribbon. As you all know,the default Ribbon buttons such as New Document,Upload Document,Alert Me,etc, have text at the bottom below the icons. Ribbon buttons such as CheckOut,CheckIn,etc have their text aligned to the right of the icons. My requirement is to have all the text on Ribbon groups and buttons aligned to the top such that the image is below the text.(By default it is the other way round). I tried manipulating the CMDUI.XML file located at 14\TEMPLATE\GLOBAL but no use. I also tried overriding the Ribbon CSS(from COREV4.CSS) but it was of no use as well. Does anyone have inputs on how to get this done? Any help is appreciated. Thanks.Regards, Gautam Kaikini, MCTS WSS 3.0 Application Development.

View Complete Post

More Related Resource Links

Page Layout and Text Layout Buttons Disabled on Ribbon

I am trying to create a publish site in Sharepoint 2010, and I am using the Ribbon control.  Currently, I am having trouble adding and changing content on my site, due to both the Page Layout and Text Layout buttons being disabled.  I have been trying to figure out what security or feature needs to be active to get these enabled again.  Any help would be appreciated.

Localization for command text Microsoft Ribbon for WPF

Hello, Is there any way I can localize the command text that comes with the ribbon, like the commands in the Ribbon context menu?   Add to Quick Access Toolbar Add gallery to Quick Access Toolbar Remove from Quick Access Toolbar Show Quick Access Toolbar above the Ribbon Show Quick Access Toolbar below the Ribbon Minimize the Ribbon Maximize the Ribbon   I got this list from the Source -- \Resources\ExceptionStringTable.txt

How can I align Left the text into a Button?

I've tried: Code Snippet Button button = new Button(); button.Width = 200; TextBlock textBlock = new TextBlock(); textBlock.Text = "Aligned text" textBlock.TextAlignment = TextAlignment.Left; button.Content = textBlock;   but it is not working.

Cannot enable Ribbon Edit Tab buttons and "connect" them to a list item in my custom webpart

I have one list with some custom fields and I want to develop a custom page. So, I created an ASPX page and added my custom webpart. This webpart has just a RichTextField, in edit mode, "linked" to one item of the list, like below: SPSite _SPSite = SPContext.Current.Site; SPWeb _SPWebProjects = _SPSite.OpenWeb("/Projects"); SPList _SPListProject = _SPWebProjects.GetList("/Projects/Lists/Project"); int _ID = Convert.ToInt32(this.Page.Request.QueryString["ID"]); RichTextField _RTF = new RichTextField(); _RTF.ID = "RTF"; _RTF.ControlMode = SPControlMode.Edit; _RTF.FieldName = "History"; _RTF.ItemContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); _RTF.RenderContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); this.Controls.Add(_RTF);   Then, I "turned on" the edit tab on the ribbon by doing the follow: protected override void OnPreRender(EventArgs e) { SPRibbon _CurrentRibbon = SPRibbon.GetCurrent(this.Page); _CurrentRibbon.TrimById("Ribbon.WebPartPage"); _CurrentRibbon.MakeTabAvailable("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.Minimized = false; _CurrentRi

HTMLEditor: Add text to the current cursor position



i am currently using the HTMLEditor and i would like to add a text to the current cursor position in the Editor.

The reason is, i want to add replacement tags when selecting an item from a dropdownlist.


Is that possible at all with the editor component?


I am appreated for any help.


Disabled buttons have blue text. How do I change?


I have an app that has black text on silver buttons.  When a button is disabled, it changes the background color as one would expect, but it changes the text to blue.  This is not what Outlook is doing.  In Outlook the disabled buttons have gray text.

Any idea why my disabled button's text is being made blue instead of gray and how to i make it follow the way the other windows apps are working?  I want gray text for disabled buttons.  BTW, visual styles are turned on.



How to align the text in justify format with SQL Server Reporting Services?



        How to align the text in justify format In SQL server Reporting Services? Is there any code to do so?

how to add buttons to ribbon in share point 2010 using object model?


how to add buttons to ribbon in share point 2010  using object model?

And how to add our custom ribbon in sp2010?

Align text in label and radiobuttonlist


I have an asp label and asp radiobuttonlist on the same line and need to get the text to align.  I understand the rbl renders as an html table.  The table appears to have spacing around the td elements, which pushes the text down.

Here's my code and CSS.  How can I get the text to align in a way that will work across browsers, text size and resolution settings?


	font-size: 1.2em;
	line-height: 1.4em;
	vertical-align: top;

	font-size: 1.2em;
	line-height: 1.4em;
    border: solid 1px black;

.RadioButtonList td
    border: solid 1px black;

    float: left;
    padding: 0em 0em 0 0.5em;

#tableadjusterContainer span
    float: left;
    border: solid 1px black;


        <div id="tableadjusterContainer">
            <asp:label ID="llbMissing" runat="server" Text="Show missing responses?" CssClass="Label"></asp:label>
                <asp:RadioButtonList ID="rblMissing" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" CssClass="RadioButtonList">
                    <asp:ListItem Value="N" Text

CheckBox text align vertically middle


Hi all,

How to make the CheckBox text align vertically middle


Babu Kumarasamy.

How to hide ribbon buttons in a publishing webpart page?



I'm trying to hide some ribbon buttons from a publishing web part page(a page thats url ends with: /pages/default.aspx), and i just can't seem to do it.

I created a feature with custom actions to hide the buttons but it doesn't work for publishing web part pages.

Can someone give me a working example on how to hide the Make Homepage button from a webpartpage?

Here is the code i used that's currently not working, in 3 different formats, neither of them works for me:


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

SP2010: Ribbon: How to use Text Box?


Hi there, we're taking advantage of the Issues Tracking lists on a number of project sites using SP2010. I've created a VS2010 solution that adds a new group with a Label and TextBox control and that works great.  Problem is, when my JavaScript CommandUIHandler runs, I have no idea how to access what the user actually typed in to build the URL to the issue ID, and couldn't find documentation on it.

Any ideas?




Text on buttons appears fine on Windows 7 machine but is partially chopped off on Windows Server 200


I have an application that was developed in Visual Studio 2010 on a Windows 7 machine. When testing from any Windows 7 machine, all is well - the text of the buttons are showing fine. However, when I try to run the same application on a Windows Server 2008 machine, the end of the text (right side) is chopped off. Does anyone what may cause this?

I have done research and found some info about default fonts, but this does not apply here because all needed fonts are on both machines. I have also found an article at http://msdn.microsoft.com/en-us/library/bb756969.aspx that mentions that the DPI scaling may be causing this issue. The DPI scaling is set to 96 on the development machines (WIndows 7), but I cannot view the DPI on the WIndows Server 2008 machine. If the latter is the likely problem, can someone please point me towards a solution for this problem?

Any help would be appreciated.

Enable/Disable "Edit" and "Check In" buttons in Ribbon

We want to enable or disable "Edit" or "check in" buttons in ribbon depending upon code run in C#. We have visited a lot of resource but mostly describes for custom buttons. We need to do this for buttons provided out of the box. Any help?

Possible to call buttons in the ribbon with javascript / jquery?

Hi all,

Is it possible to call commands in the ribbon such as save, edit and so on through JavaScript?   If it is, would it be possible to assign hotkeys with i.e. jquery hotkeys pluging so that alt+s could have the same effect as clicking the save button (or any other button)?


Ribbon Buttons Grey Out Randomly


Hello all,

Users with the correct permissions are having Ribbon Buttons greying out randomly. Example: The New Document button works a few times and then greys out.

Could a proxy server affect this? Has anyone expierenced this issue?


Gridview with Radio Buttons

As now, Radio buttons are HTML controls, I am not able to get it on server side. When user select any radio button and press submit, Control will not available at code behind, you can use "e.Item.FindControl" as it is not "runat='server'". I want ID "Primary Key" value for selected radio button. To achive this I took the help of Javascript. I wrote javascript function that sets the values of "Primary Key" in hidden field when user clicks on any radio button. Now when user clicks on Submit button, user can get selected value froim hidden field.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend