This is a migrated thread and some comments may be shown as answers.

Collapse Extended Area On QuickAccessToolbar Menu Item

5 Answers 6 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Martin Hamilton
Top achievements
Rank 1
Veteran
Martin Hamilton asked on 26 Aug 2020, 01:09 PM
Can anyone tell me how to get rid of the extended area next to the button as shown in red in the attached image?

5 Answers, 1 is accepted

Sort by
0
Nadya
Telerik team
answered on 27 Aug 2020, 03:32 PM

Hi Martin,

Your question has already been answered in the other thicket (ID 1482366) you have opened on the same topic. Please, see our answer there for more information.
We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding. 

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Martin Hamilton
Top achievements
Rank 1
Veteran
answered on 27 Aug 2020, 03:36 PM

Hi Nadya

"Part of the question" was answered 

I posted a second request to my Support Ticket since the first response had only a partial fix 

After applying the code - the Options and Exit buttons still show up

My second question was;

is it possible to remove the blank area (refer to 1) - although this is not a big deal, it would be nice
More importantly - how do I hide or collapse the Options and Exit buttons (refer to 2)

Maybe you can help me with this.

0
Martin Hamilton
Top achievements
Rank 1
Veteran
answered on 27 Aug 2020, 03:40 PM

I'm primarily now only concerned with the second issue

More importantly - how do I hide or collapse the Options and Exit buttons (refer to 2)

0
Martin Hamilton
Top achievements
Rank 1
Veteran
answered on 27 Aug 2020, 04:16 PM

Nadia, Not trying to be crass but for all of the typing you put into your response you could have just typed this instead.

MainForm.RadRibbonBar1.OptionsButton.Visibility = ElementVisibility.Collapsed
MainForm.RadRibbonBar1.ExitButton.Visibility = ElementVisibility.Collapsed

For anyone else out there that would like a concise set of routines (not all have been tested) - perhaps the following code will help get you up and running a bit faster.

#Region " Ribbon Bar "
    Friend Sub RemoveQuickAccessButtonCrescent(ByVal oRibbonBar As RadRibbonBar)
        oRibbonBar.RibbonBarElement.QuickAccessToolBar.ToolbarPositionMenuItem.Visibility = ElementVisibility.Collapsed
        oRibbonBar.RibbonBarElement.QuickAccessToolBar.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
        oRibbonBar.RibbonBarElement.QuickAccessToolBar.MinimizeRibonMenuItem.Visibility = ElementVisibility.Collapsed
    End Sub
    Friend Sub SetQuickAccessIcon(ByVal oRibbonBar As RadRibbonBar, ByVal oImage As Image)
        AddIconToQuickAccessButton(MainForm.RadRibbonBar1, oImage)
    End Sub
    Friend Sub RemoveQuickAccessSecondColumn(ByVal oRibbonBar As RadRibbonBar)
        oRibbonBar.RibbonBarElement.ApplicationMenuRightColumnWidth = 1
        oRibbonBar.RibbonBarElement.ApplicationButtonElement.ShowTwoColumnDropDownMenu = False
        oRibbonBar.RibbonBarElement.ApplicationButtonElement.Alignment = ContentAlignment.MiddleLeft
    End Sub

    Friend Sub RemoveQuickAccessButton(ByVal oRibbonBar As RadRibbonBar)
        oRibbonBar.RibbonBarElement.ApplicationButtonElement.Visibility = ElementVisibility.Collapsed
        oRibbonBar.RibbonBarElement.TabStripElement.ItemContainer.PositionOffset = New SizeF(-oRibbonBar.RibbonBarElement.ApplicationButtonElement.Size.Width, 0)
    End Sub
    Friend Sub AddIconToQuickAccessButton(ByVal oRibbonBar As RadRibbonBar, ByVal oImage As Image)
        oRibbonBar.RibbonBarElement.ApplicationButtonElement.Image = oImage
    End Sub
    Friend Sub RibbonBarToTitleBar(ByVal oRibbonBar As RadRibbonBar)
        oRibbonBar.MaximumSize = New Size(0, 50)
        oRibbonBar.RibbonBarElement.TabStripElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
    End Sub
    Friend Sub SetRibbonBarIcon(ByVal oRibbonBar As RadRibbonBar, ByVal oImage As Image)
        oRibbonBar.RibbonBarElement.TabStripElement.ContentArea.Image = oImage
        oRibbonBar.RibbonBarElement.TabStripElement.ContentArea.ImageAlignment = ContentAlignment.MiddleRight
    End Sub

    Friend Sub RemoveOptionsButtonFromQuickAccess()
        MainForm.RadRibbonBar1.OptionsButton.Visibility = ElementVisibility.Collapsed
    End Sub

    Friend Sub RemoveExitButtonFromQuickAccess()
        MainForm.RadRibbonBar1.ExitButton.Visibility = ElementVisibility.Collapsed
    End Sub

    Friend Sub AddHandlerForQuickAccessOptionsButton(ByVal oRibbonBar As RadRibbonBar)
        AddHandler oRibbonBar.OptionsButton.Click, AddressOf QuickAccessOptionsButton_Click
    End Sub

    Friend Sub QuickAccessOptionsButton_Click()
        'Not Tested
    End Sub

    Friend Sub AddHandlerForQuickAccessExitButton(ByVal oRibbonBar As RadRibbonBar)
        AddHandler oRibbonBar.ExitButton.Click, AddressOf QuickAccessExitButton_Click
    End Sub

    Friend Sub QuickAccessExitButton_Click()
        'Not Tested
    End Sub
#End Region

0
Nadya
Telerik team
answered on 28 Aug 2020, 03:26 PM

Hello, Martin,

Thank you for the provided code snippet.

In order to collapse the exit and options buttons that are shown in the pop up please refer to the following code snippet:

RadRibbonBar1.RibbonBarElement.ExitButton.Visibility = ElementVisibility.Collapsed
RadRibbonBar1.RibbonBarElement.OptionsButton.Visibility = ElementVisibility.Collapsed

I hope this helps. Let me know if I can assist you further.

Regards,
Nadya
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
RibbonBar
Asked by
Martin Hamilton
Top achievements
Rank 1
Veteran
Answers by
Nadya
Telerik team
Martin Hamilton
Top achievements
Rank 1
Veteran
Share this question
or