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

Change Background on Bubblebar

8 Answers 168 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard Thurgood
Top achievements
Rank 1
Richard Thurgood asked on 31 Jul 2008, 04:30 AM
Love it, love it!  The bubble bar is fantastic.

Now, how can I change the background?  I'd like it to simply be transparent so my [image] buttons appear as though they are on the page itself.

Thanks guys! Great product!!!

8 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 31 Jul 2008, 07:46 AM
Hello Richard Thurgood,

Thank you for your interest in RadControls for Winforms.

The Quick-Start Framework's (QSF) BubbleBar is a demo control that demonstrate the Telerik Presentation Framework (TPF) capabilities. As it is a demo, the API of this control is not fully developped.

To change or switch off the Background you should access the background fill primitive using the following line:

this.bubbleBar1.Element.Children[0].Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

You can easy change the background colors, gradient and other properties.

((FillPrimitive)this.bubbleBar1.Element.Children[0]).BackColor2 = Color.Red
...
((FillPrimitive)this.bubbleBar1.Element.Children[0]).NumberOfColors = ...


The Children[1] is BubbleBar's BorderPrimitive - it is also easy to manage by following this pattern.

To inspect and access element hierarchichy, you can use the RadSpy tool.

Hope this helps.

Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
guy
Top achievements
Rank 1
answered on 28 Apr 2009, 10:07 PM
Hi,
    I want to add RadLabel control below button. How i can do that? I am using C#, sample code will be appiriciated.
Also
    How I can find out programatically which button has been clicked.

Thank you

Guy
0
Peter
Telerik team
answered on 29 Apr 2009, 09:17 AM
Hello,

Thank you for writing.

You could use the button Text property instead of adding a label below the button (screenshot0 and 2).

About the click event: Please, subscribe to the click event for each button individually and you will know which button was clicked (screenshot1 or code below):

 this.radButtonElement3.Click += new System.EventHandler(this.radButtonElement3_Click); 

Refer to the attached project or this Code Library.

Hope this helps. Do not hesitate to write me back if you have further questions.

Kind regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
guy
Top achievements
Rank 1
answered on 29 Apr 2009, 05:41 PM
Thank you for quick response. Appriciate it.
Is there any way to know what button is clicked in bubblebar_click event and not write individual element click event?
0
Peter
Telerik team
answered on 30 Apr 2009, 07:28 AM
Hi,

Thank you for getting back.

You could subscribe all buttons to one Click event:

this.radButtonElement1.Click += new System.EventHandler(this.radButtonElement_Click);  
this.radButtonElement2.Click += new System.EventHandler(this.radButtonElement_Click);  
this.radButtonElement3.Click += new System.EventHandler(this.radButtonElement_Click);  
Then use the Sender argument of radButtonElement_Click to recognize by Button.Text property which button is press.
private void radButtonElement16_Click(object sender, EventArgs e) 
        { 
            RadButtonElement clickedButton = sender as RadButtonElement; 
            if( clickedButton != null ) 
            { 
                switch( clickedButton.Text ) 
                { 
                    case "Button1"
                        break
                    case "Cancel"
                        break
                } 
 
            } 
        } 

Hope this helps.

Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
guy
Top achievements
Rank 1
answered on 30 Apr 2009, 11:33 PM
Thank you very much!! Nice component.
0
Alex S
Top achievements
Rank 1
answered on 03 Aug 2009, 12:57 PM
Hello.
I use the bubblebar control with image buttons on the transparent form. But each drawn button has a white border pixels ( not from the image file). This border disappears on mouse over but it is always present in normal button state. 
Is it something with antialiasing? I tried to change SmoothingMode but nothing helps.
Could you please help me to remove these white pixels?
Thanks
0
Peter
Telerik team
answered on 04 Aug 2009, 07:23 AM
Hello Alex S,

Thank you for your interest in RadControls. It seems that you are using a very old trial version, so please download the latest one. There are a lot of improvements in it.

As to your question, you can turn off the buttons border using the code snippet below:

this.radButtonElement1.ShowBorder=false 

or you can edit the button theme to avoid the button border.

All the best,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Richard Thurgood
Top achievements
Rank 1
Answers by
Peter
Telerik team
guy
Top achievements
Rank 1
Alex S
Top achievements
Rank 1
Share this question
or