ribbonwinforms / ribbonwinforms Goto Github PK
View Code? Open in Web Editor NEWAn Office Ribbon Control for .NET WinForms
License: Microsoft Public License
An Office Ribbon Control for .NET WinForms
License: Microsoft Public License
Hi Hoping someone can help me with where to resolve these issues in the source code.
Using VS2017, assembly version 5.0.0.0 of System.Windows.Forms.Ribbon, .Net Framework 4.7.1, Form class set to inherit from RibbonForm instead of Form.
Have tried building with .Net 2.0 but this makes no difference.
Thanks for any suggestions.
Jeff
Steps to reproduce:
Does someone know how to solve this issue? (Have I missed something?)
Thanks in advance,
-Piet
Hi, first, sorry, my English isn't that good, i don't speak them.
I found the problem when i click the Orb, then, the Ribbon Control fires a Click Event of the first RibbonButton added into the first panel of the first Tab.
Eg:
private System.Windows.Forms.RibbonPanel rpEmisionComprobantes;
this.rpEmisionComprobantes = new System.Windows.Forms.RibbonPanel();
private System.Windows.Forms.RibbonButton rbFacturacion;
this.rbFacturacion = new System.Windows.Forms.RibbonButton();
this.rbFacturacion.Image = ((System.Drawing.Image)(resources.GetObject("rbFacturacion.Image")));
this.rbFacturacion.LargeImage = ((System.Drawing.Image)(resources.GetObject("rbFacturacion.LargeImage")));
this.rbFacturacion.MaxSizeMode = System.Windows.Forms.RibbonElementSizeMode.Medium;
this.rbFacturacion.Name = "rbFacturacion";
this.rbFacturacion.SmallImage = ((System.Drawing.Image) resources.GetObject("rbFacturacion.SmallImage")));
this.rbFacturacion.Text = "Facturas";
this.rbFacturacion.Click += new System.EventHandler(this.rbFacturacion_Click);
this.rpEmisionComprobantes.Items.Add(this.rbFacturacion);
When i click the Orb, the ribbon fires rbFacturacion_Click event, and then DropDown the orb
Can u help me to solve this?
Thanks
Juan
Hi
Ribbon in RightToLoeft=True
is not displaying and working correct!
I can't get the drop down list of a RibbonButton to open using alt key. I double checked that all AltKey properties on the form are unique, but nothing happens when is use the keyboard shortcut assigned to the drop down button.
I have tabs 1 through 4, when the form opens however, I want to have tab 3 selected (tab 1 is selected by default).
Can I do this programatically?
Thanks
Currently using VS2017, and whenever the form inherits from RibbonForm, it breaks in the designer.
The project can still be built and run perfectly fine, it's just the designer that is broken.
No listed error apart from the classic "The designer failed to provide a root component".
Hi all, (using winforms VB.NET)
I have a list of List of strings which I use to populate my menus DropDownList's, as per below (which works)
I've added the Ribbon Control to form1. But I can't add a drop down items using this code ...
Dim TempListofTablesNames As New List(Of String)()
TempListofTablesNames.AddRange(Mod_DBStructure.ListofTablesNames)
If TempListofTablesNames.Count > 0 Then
For i = TempListofTablesNames.Count - 1 To 0 Step -1
Form1.ToolStrip2_SelectTableComboBox.Items.Add(TempListofTablesNames(i).ToString()) 'works'
'new ribbon code' Form1.EditTable_RibbonButton.DropDownItems.Add(TempListofTablesNames(i).ToString(), My.Resources.table_edit.ToBitmap) 'errors'
Next
How do I build a ribbon item? Thanks for looking.
Hi!
Thanks for this great work.
Is there a way to change the style by a more modern Office UI (2016 or 2019)? If not, how can I contribute to this project?
Thanks in advance.
First this is an amazing control and I have only just start using it over the past 2 days. I've brought it into my solution and have everything working great except for one thing. I'm not sure if it is a bug or a setting somewhere that needs to be turned off.
I am using it in an MDI form. For the first added RibbonTab/RibbonButton, the Orb click event instant shows the Orb then retracts it. Click on a different RibbonButton then the RibbonOrb displays correctly. I can repeat it every time. It is like the RibbonButton's [Click] event is fired just by clicking the button to display the RibbonOrb?????? For all other tabs/panels the Orb stays up and is visible however, with this one it instantly retracts/hides itself again.
Any Idea why?
If the original developer wants to contact me directly then I can be reached at [email protected]
The sample Applications need to be refactored, some bugs need to be fixed.
Hi,
I found an issue:
When I place in code:
Panel.Visible = false;
Panel.Visible = true;
then Panel will be still invisible.
If I hide Panel in properties and unhide from code, then it works, but only once.
If I hide Panel from code, then it will be invisible for ever ;)
Best Regards
I was trying to add items to a RibbonComboBox, but I could not figure out how to it. Is this possible?
What is the best way to assign a shortcut to the buttons?
hi
ribbon can support winform datagridview ?thanks!
if I want to fill out the "DropDownItems" collection at run time
ok no problem ... but
the DropDownShowing is not raised, if it does not contain at least one element added a time design
Amitiés
Lionel
This issue happens only on Windows 10 updated to April 2018 (version 1803). If you set the display scaling above 100% (i tried 150% and 200%), the click event does not fire when clicking items on dropdown RibbonButtons.
Note that scaling over 100% is the default in most high-dpi displays.
Debugging the issue I have discovered that the problem is related to FeedHookClick function on RibbonPopupManager class. This function checks if the mouse position is contained into the dropdown bounds.
While before April 2018 Update the mouse location passed as parameter is scaled accordingly with display scaling setting, on April 2018 the mouse location is the real one, related to the physical display resolution, not scaled.
If you set the display scaling at 100% the virtual ant the physical mouse coords are the same, so the issue does not happens.
On April 2018 Update when scaling over 100% the FeedHookClick function mouse position check fails because the (physical) mouse position is outside the (virtual) dropdown bounds, so the function returns false and no mousedown/click/ect. events are fired.
The mouse location passed to FeedHookClick function come from the windows message queue hooked with SetWindowsHookEx API (see GlobalHook class, InstallHook function). This means that Microsoft has changed some policies on passing these coords with April 2018 Update.
Can this be considered a bug from Microsoft? Maybe, i don't know. The problem is: how to fix the bug on the Ribbon? You could change the FeedHookClick function scaling correctly the mouse position before checking, but it will work only on April 2018 Update, not with prior versions.
Should you check the version of Windows and scaling before checking only if >= April 2018 Update?
Anyway, in the meantime i have modified the FeedHookClick function returning ALWAYS true, so the mouse events are always fired. I have made some tests and, for my situation, i have not found any negative side effects.
Somebody can say something more about this issue?
NOTE that maybe the problem could be the same of the issue #1 opened on 26 Nov 2017 by PietF
I'm using the Office_2013 Orb with the latest release. It seems that my first RibbonOrbMenuItem is firing a click event when I have the Ribbon minimzed and want to click on the Orb.
If I hold down the mouse and slide just a few pixels away from the Orb, nothing get's fired. It's just in minimized state, when maximized/normal, everything works fine.
Edit: I tried a little bit, it seems that not my first OrbMenuItem is fired, it's the leftest Ribbon Button of the current open Ribbon Tab. So the Ribbon seems to be still open, as I can see the tooltips, and overlaying over my RibbonOrb...
If you need any additional info in replicating this issue, just send me a little message
As we want the top ribbon hidden after selecting something we add "Ribbon1.Minimized = true". This way we maximize the amount of space on the screen. What we have found is that when the screen resolution is set to 125% the click events for the ribbon no longer works to open any other screen????
Anyone know how to fix this?
Thanks
brendan
private void ribbonButton2_Click(object sender, EventArgs e)
{
foreach (Form f in MdiChildren)
{
if (f.GetType() == typeof(MDIChild1))
{
f.Activate();
return;
}
}
Form form = new MDIChild1
{
MdiParent = this
};
form.Show();
ribbon1.Minimized = true;
}
Currently there appears to be some issues with this library on windows 10 (weird border, blurry text, cut off elements, flickering).
I'd be willing to work on a new "Office 2016" style (because I need it anyway) and to fix some of these bugs.
If I can ask some questions, get feed back here, and make issues here I would be willing to contribute these changes back to the community. I'm just putting this out here to see if anyone is already doing it, or has any thoughts, or would like to help in anyway (so we can divvy up the work).
How to collapse and expand the Ribbon Menu?
like Outlook, we can collapse and expand the menu.
It's possible? I change everything that is property in my custom theme but I can not enforce my changes ...
Hey guys,
I've found some litte graphic bugs. I'm using windows 10 v1803 and VS2017 Pro.
When you inherit the mainform with the RibbonForm some small black lines appear under the tabs:
All elements are not vertically centered. This causes checkboxes to truncate the text (or have I overlooked a setting?)
-nessor
There doesn't seem to be any public releases or Nuget packages available.
Is there a plan to provide some consumable binaries so we don't have to build the code ourselves?
I hope the ribbontab's height of bounds can changed, but now is not.
file RibbonPanelPopup.cs
inserted one if keyword
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Panel.Owner.Renderer.OnRenderPanelPopupBackground(
new RibbonCanvasEventArgs(Panel.Owner, e.Graphics, new Rectangle(Point.Empty, ClientSize), this, Panel));
foreach (RibbonItem item in Panel.Items)
{
if (item.Visible) //here
{
item.OnPaint(this, new RibbonElementPaintEventArgs(e.ClipRectangle, e.Graphics, RibbonElementSizeMode.Large));
}
}
Panel.Owner.Renderer.OnRenderRibbonPanelBackground(new RibbonPanelRenderEventArgs(Panel.Owner, e.Graphics, e.ClipRectangle, Panel, this));
Panel.Owner.Renderer.OnRenderRibbonPanelText(new RibbonPanelRenderEventArgs(Panel.Owner, e.Graphics, e.ClipRectangle, Panel, this));
}
I have 2 or more tab, now is active the first.
How can i open (only activate, the tab is alredy created)the second in RibbonWinForms?
Thanks
I would find it useful to be able to hide the text of a RibbonPanel, to have a new property like .HideText or .ShowText, reducing the height of the panel. Or even that the text-area disappears when text is set to empty.
Thanks.
Is there a Nuget package for this ribbon? If so, which? If not, are there plans to make one? I have never done one myself but would be willing to volunteer if you guys prefer.
Thanks for rebooting this project, btw.
Hello,
I do not have any knowledge in English, excuse me for that.
I want to congratulate you on the excellent project and who is contributing to the improvements.
When trying out this project I intend to use it, I realized that when I dynamically create dropdown items and when too full popup panel appears and with that I can not move them with the mouse at all. Could anyone check this out on this project? Thank you all.
Hi I'm trying to tab between items inside my ribbonPanel, Say I have three textbox in the panel I need to move between them using tab. I couldn't find tabindex property of the items inside the panel
In this sample ribbonpanel when I press tab it should switch between the individual buttons not to go to the next panel
Great ribbon control! :-)
Any plans to provide .NET Core 3 builds as well?
I use the ribbon in WinForms application. I have several buttons having dynamically populated hierarchy of DropDownItems. When users expand one top level item and then expands another one, the first item hierarchy remains expanded whereas I would expect it to autohide.
Is there anything I can do to fix that by means of control settings?
Thanks
Hi
This is not bug. I appreciate your efforts in building the Ribbon Win Form to the community. I was desperately searching for Ribbon Menu and using PB 12.5 Classical with no dot net features. It will be very much helpful if you guide us for implementing it in PB Classical.
In my case,
when owner form is minimized, all RibbonPanels going to Overflow mode in while loop.
And does not exit the while loop.
I did fix a line of code.
Component Classes\RibbonTab.cs #946 line.
if (!Owner.IsDesignMode())
to
if (!Owner.IsDesignMode() && (Owner.TopLevelControl as Form)?.WindowState != FormWindowState.Minimized)
Hi, everyone,
as some might have detected, currently there is no support for ImageLists in RibbonWinForms.
For now, that's one of my top-priorities for version 6. If you have any ideas and comments, just drop a line.
Thanks!
Hi,
I think this project is a great project,Is it possible for this project to be merged into dotnet/winforms?
I need to inherit from RibbonLabel and override methods so that I can draw text in bold and the background in a different color.
However, I couldn't find any Font property to use.
Where and how can I access the Font and BackColor properties for the inherited control?
This component works surprisingly well under Mono in Linux, but it has a few places where it crashes. Has someone checked out these issues so far? If not, I'd like to contribute a few patches to make it work as well as possible.
I attemp to move an MDIForm while clicking on the top of the window and drag it.
The form doesn't move.
If you try with an simple form that doesn't inherit from Ribbonform, all is done normaly.
There also another problem with double click to restore fullcreen status of the form, it doesn't work too.
I try to search why, but some help will be appreciate.
Thx,
Astronäar
Is there any way to make the ribbon tabs collapsible?
...
Hi,
I installed RibbonWinForms 5.0.1.1 from NuGet. But there is no ribbon in toolbox, even inside Choose Toolbox Items. Adding only dll not worked too. Your example project works fine but when I add my own project it can't find the tools.
Manually (with code) adding a Ribbon to RibbonForm working fine but there is something wrong with designer.
Configuration:
Fix Bug Excpetion PixelFormat is DontCare
vsc55@eb9f3fc
Hi there
Great project but i experience some errors when i try to build it from source
What are the requirements
My build system is:
Windows 10
VS 2015 Community
hi,
it seems that after some kind of Windows update in the last few weeks, DropDownItemClicked and TextBoxTextChanged events of ribbonComboBox are not fired anymore (before they were working fine).
Unfortunately it doesn't happen on my develop machine but on few production machines (windows 7, 8 and 10)
Am I the only one with this issue?
Thanks
Hi!
I would like to manipulate some properties of Ribbon elements (name, visible and enabled) dynamically with codes like these:
string Tb = "MyRibbonTab";
this.Controls [Tb] .Name = "Tab Save";
string Pnl = "MyRibbonPanel";
this.Controls [Pnl] .Name = "Pnl Save";
string Itm = "MyRibbonItem";
this.Controls [Itm] .Name = "Item Save As";
Anyone here can help me?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.