|
I used this control in my project (VC++ .NET) but after succesfully compiled, color of selected tab is black. How can i solve this problem ?
PS : thacvv18 had the same problem too so my screenshot is like it, http://farm2.static.flickr.com/1397/769881994_1a1eb39960.jpg?
|
|
|
|
|
Hi,
When I try to add a tabStrip, I receive a popup stateing the following:
Value cannot be null. Parameter name: component
Can anyone please help me?
Many thanks in advance
Regards,
P.S Call me stupid but, making this thing work .... is not that easy
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
modified on Monday, March 10, 2008 8:14 AM
|
|
|
|
|
Yes,I found this exception too!
Graphics g = pevent.Graphics;
try { g.DrawImage(_toshow, pevent.ClipRectangle); }
catch { //Just occur here}
But i can not find the way to solve it .
can you give me some sugguestiones?
|
|
|
|
|
I love this control but it looks like a first chance exception is thrown here
is there a way to avoid it:
<br />
Graphics g = pevent.Graphics;<br />
try { <br />
g.DrawImage(_toshow, pevent.ClipRectangle); <br />
}<br />
catch { }<br />
|
|
|
|
|
Yes,I found this exception too!
Graphics g = pevent.Graphics;
try { g.DrawImage(_toshow, pevent.ClipRectangle); }
catch { //Just occur here}
But i can not find the way to solve it .
can you give me some sugguestiones?
|
|
|
|
|
I've just replaced to:
if (_toshow != null)
{
g.DrawImage(_toshow, pevent.ClipRectangle); }
}
and made similar fix with
if (_img != null)
{
...
g.DrawImage(_img, r);
...
}
"if"-statement is more lightweight than try{...}catch{...} one from resource consumption point of view .
|
|
|
|
|
Hi, firstly nice job it looks pretty good, however as soon as Microsoft gets their pattent on ribbon technology you are going to have lots of work to do as on resising alone you are massively off the design guidelines. The purpose of the guidelines are to provide a consistent user experience throughout ribbon based applications, and while yours is pretty (and fast) it's not consistent with office at all.
Ps. No I don't work for Microsoft however I have a shameless plug for my codeproject page http://www.codeproject.com/KB/menus/ribboncontrol.aspx[^] which meets far more of the guidelines.
Do you like fishes? I do.
|
|
|
|
|
This one does look nice, but it seems to run very slow on my PC. Where can we find these guidelines?
Do the guidelines cause any problems if using this ribbon control in a commercial application??
|
|
|
|
|
Try google msdn.microsoft.com/officeui.
Depending on your views you either have to conform to the guidelines for ALL applications (even non-commercial) or NO applications (including commercial). Microsoft currently has no patent and so technically the guidelines and license are currently not a legal requirement, however if Microsoft gets their patent then ALL applications will have to conform (as it is a part of Office UI licensing).
The bad part; you have to agree to a non-disclosure agreement about the license details AND the details of the guidelines. The guidelines are very indepth (about 120+ pages). Who cares if you can't tell the world about the guideline details anyway though???
The good part; licensing is free UNLESS you are building an application to directly compete with a Microsoft Office product. The guidelines are very indepth making implementation actually fairly easy although time consuming.
Long story short, to be on the safe legal side and make a better application, stick to the guidelines for ALL projects (both commercial and non-commercial). The guidelines are sensible, make applications consistent, and probably will become a legal requirement anyway.
|
|
|
|
|
Dan Walmsley wrote: run very slow on my PC
That may not be the application but rather Windows Presentation Foundation (WPF) having a known flaw of being a bit slow (google "WPF slow"); bare in mind the code is alpha too.
|
|
|
|
|
this is excellent controls but i need to know how to add child forms .
Thanks.
Ahmed
|
|
|
|
|
Every time I try to add the component, I keep getting an error saying: failed to load component "Ribbon Panel"
|
|
|
|
|
|
it is very nice but the thing is that i can't a reference for visual studio 2003 because this project might be made in a newer version of visual studio...
pls...
i really like it
yeah! bling bling men...abz'
|
|
|
|
|
I have found a slight problem with the info form image, depending on how the application is launched these images may or may not be seen.
If launched from the directory where the program exists by clicking the EXE files icon, everything is ok. By launching the program from a desktop shortcut the images do not appear. This is because the program is now looking in the desktop folder instead of the application folder. I tried to look in your source code where to change this, you need to add the string Application.StartupPath in front of the file location from within the class source code. I tried putting this inside a client program but this doesn't seem to work. Any ideas?
It would actually be an improvement if I could use an image that is embedded in the programs Properties.Resource namespace. I can do this for you ribbon buttons,etc.
I think these minor changes would improve you control greatly. Also I have noticed if the ribbon loses focus and another window pops over the ribbon then the text on a button sometimes moves to the middle of the button and the img moves or becomes corrupt, this resolves itself when the user puts the mouse back over the button, presumably because it is redrawn.
|
|
|
|
|
To fix this problem:
"Also I have noticed if the ribbon loses focus and another window pops over the ribbon then the text on a button sometimes moves to the middle of the button and the img moves or becomes corrupt, this resolves itself when the user puts the mouse back over the button, presumably because it is redrawn."
In the RibbonButton.cs file, in the OnPaint event
change Rectangle clip = pevent.ClipRectangle; to Rectangle clip = this.ClientRectangle;
And change
Rectangle rect = pevent.ClipRectangle;
to
Rectangle rect = this.ClientRectangle;
It still kind of flickers when you drag another window over it, but I think this could be solved by using double buffering.
|
|
|
|
|
I would like to convert this source code to vb.net
if (typeof(NamespaceName.TabStrip) == control.GetType())
{
..............
}
I convert and it have the error.Please help me.
"(GetType(NamespaceName.TabStrip) = control.[GetType]())" it have error.Thank you.
|
|
|
|
|
Maybe it is late for the answer but i have just checked your problem,
you have to type as follows:
Typeof(NamespaceName.TabStrip) Is control.GetType()
Cheers!
|
|
|
|
|
Before i spend a bunch of time trying to get an updated Control Library working is there already some updated code or refactored code that hasn't been posted. It seems like a lot of people use and enjoy this great set of controls Juan was been working on, so i was hoping to get the newest versions anyone or Juan had before i atempt to do it.
|
|
|
|
|
What license is this released under? I didn't see anything in the sources about it. I would like to use this in an open source project, but I want to make sure I'm attributing the license and copyright correctly.
Thanks!
Payton Byrd
|
|
|
|
|
Sorry everyone if at the moment I'm not responding all the questions, this is due I'm full of projects and I dont have time to answer and improve as I want. Answering your question, You can use as you want, its free for using in personal and commercial projects, I'll be pleased if you add me in the credits of your application, and show me a screenshot to take a look.
I hope with this reply it's clear about the licence.
Regards, Juan Pablo
|
|
|
|
|
Microsoft encourages anyone that develops something with a similar look and feel to the Office 2007 to acquire a free license from them. This binds developers to some guidelines in order to maintain the quality of the look and feel of the ribbonstrip-type control.
See here:
http://msdn2.microsoft.com/en-us/office/aa973809.aspx
|
|
|
|
|
Just been messing around with the ribbon control again and noticed on Vista Ultimate with the "grey" theme that the ribbon selected colours don't match the rest of it. Better explanation here[^].
|
|
|
|
|
you forget to add these functions to your form:
public void SetBase(int R, int G, int B, Color HaloColor)
{
this.SuspendLayout();
foreach (Control control in this.panel1.Controls)
{
if (typeof(RibbonStyle.TabStrip) == control.GetType())
{
((RibbonStyle.TabStripProfessionalRenderer)((RibbonStyle.TabStrip)control).Renderer).HaloColor = HaloColor;
((RibbonStyle.TabStripProfessionalRenderer)((RibbonStyle.TabStrip)control).Renderer).BaseColor = Color.FromArgb(R + 4, G + 3, B + 3);
for (int i = 0; i < ((RibbonStyle.TabStrip)control).Items.Count; i++)
{
RibbonStyle.Tab _tab = (RibbonStyle.Tab)((RibbonStyle.TabStrip)control).Items[i];
#region Set Tab Colors
if (Color.FromArgb(R, G, B).GetBrightness() < 0.5)
{
try
{
_tab.ForeColor = Color.FromArgb(R + 76, G + 71, B + 66);
}
catch
{
_tab.ForeColor = Color.FromArgb(250, 250, 250);
}
}
else
{
try
{
_tab.ForeColor = Color.FromArgb(R - 96, G - 91, B - 86);
}
catch
{
_tab.ForeColor = Color.FromArgb(10, 10, 10);
}
}
#endregion
}
control.BackColor = Color.FromArgb(R - 24, G - 8, B + 12);
}
if (typeof(RibbonStyle.TabPageSwitcher) == control.GetType())
{
control.BackColor = Color.FromArgb(R - 24, G - 8, B + 12);
foreach (Control _control in control.Controls)
{
if (typeof(RibbonStyle.TabStripPage) == _control.GetType())
{
((RibbonStyle.TabStripPage)_control).BaseColor = Color.FromArgb(R, G, B);
((RibbonStyle.TabStripPage)_control).BaseColorOn = Color.FromArgb(R, G, B);
foreach (Control __control in _control.Controls)
{
if (typeof(RibbonStyle.TabPanel) == __control.GetType())
{
#region Set TabPanel Colors
if (Color.FromArgb(R, G, B).GetBrightness() < 0.5)
{
try
{
__control.ForeColor = Color.FromArgb(R + 76, G + 71, B + 66);
}
catch
{
__control.ForeColor = Color.FromArgb(250, 250, 250);
}
}
else
{
try
{
__control.ForeColor = Color.FromArgb(R - 96, G - 91, B - 86);
}
catch
{
__control.ForeColor = Color.FromArgb(10, 10, 10);
}
}
#endregion
((RibbonStyle.TabPanel)__control).BaseColor = Color.FromArgb(R, G, B);
((RibbonStyle.TabPanel)__control).BaseColorOn = Color.FromArgb(R + 16, G + 11, B + 6);
foreach (Control ___control in __control.Controls)
{
if (typeof(RibbonStyle.RibbonButton) == ___control.GetType())
{
((RibbonStyle.RibbonButton)___control).InfoColor = Color.FromArgb(R, G, B);
RibbonStyle.RibbonButton _but = (RibbonStyle.RibbonButton)___control;
#region Set Button Colors
if (Color.FromArgb(R, G, B).GetBrightness() < 0.5)
{
try
{
_but.ForeColor = Color.FromArgb(R + 76, G + 71, B + 66);
}
catch
{
_but.ForeColor = Color.FromArgb(250, 250, 250);
}
}
else
{
try
{
_but.ForeColor = Color.FromArgb(R - 96, G - 91, B - 86);
}
catch
{
_but.ForeColor = Color.FromArgb(10, 10, 10);
}
}
#endregion
}
}
}
}
}
}
}
}
this.ResumeLayout(false);
}
public void SetStyle(string Name)
{
Color HaloColor = Color.White;
switch (Name)
{
case "Dark":
this.BackColor = Color.FromArgb(88, 77, 69);
HaloColor = Color.FromArgb(200, 200, 200);
SetBase(87, 61, 53, HaloColor);
break;
case "Nature":
this.BackColor = Color.FromArgb(78, 127, 52);
HaloColor = Color.FromArgb(254, 209, 94);
SetBase(73, 118, 46, HaloColor);
break;
case "Dawn":
this.BackColor = Color.FromArgb(177, 108, 45);
SetBase(172, 99, 39, Color.FromArgb(254, 209, 94));
break;
case "Corn":
this.BackColor = Color.FromArgb(230, 193, 106);
SetBase(225, 184, 100, Color.FromArgb(191, 219, 255));
break;
case "Chocolate":
this.BackColor = Color.FromArgb(87, 54, 34);
SetBase(82, 45, 28, Color.FromArgb(232, 80, 90));
break;
case "Navy":
this.BackColor = Color.FromArgb(88, 121, 169);
SetBase(84, 112, 163, Color.FromArgb(254, 209, 94));
break;
case "Ice":
this.BackColor = Color.FromArgb(235, 243, 236);
SetBase(228, 234, 230, Color.FromArgb(254, 209, 94));
break;
case "Vanilla":
this.BackColor = Color.FromArgb(233, 243, 213);
SetBase(228, 234, 207, Color.FromArgb(254, 209, 94));
break;
case "Canela":
this.BackColor = Color.FromArgb(235, 226, 197);
SetBase(228, 217, 191, Color.FromArgb(254, 209, 94));
break;
case "Cake":
this.BackColor = Color.FromArgb(235, 213, 197);
SetBase(228, 204, 198, Color.FromArgb(254, 209, 94));
break;
default:
this.BackColor = Color.FromArgb(191, 219, 255);
SetBase(215, 227, 242, Color.FromArgb(254, 209, 94));
break;
}
}
private void Form_Load(object sender, EventArgs e)
{
SetStyle("Azure");
}
Just another style...
|
|
|
|
|
Hi, it's a great job!
I found something. When you add many tabs onto the tabstrip, it will hide some tabs in the right, and you could click it, that's good, BUT:
1. When click a tab that hired (on the rigt), content of that tab is displayed, but none of tab displayed on tabStrip. I think it's a mistake.
2. The hired tab(on the rigt) is not be skined (on "Azure"). You could expand to see the hired tab, it shows the standard control color. It's bad looking.
Thanks.
123
|
|
|
|
|