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

RadSplitButton and Styles Managing

1 Answer 112 Views
Button
This is a migrated thread and some comments may be shown as answers.
Jean-Marc Windholz
Top achievements
Rank 1
Jean-Marc Windholz asked on 03 Dec 2010, 12:33 PM
Hi,

I need to make the selection of the RadSplitButton when RadDropDownButtonElement is selected. For make this, I'm changing Style Parameter of the different buttons and when another button is Selected I have to restore Original Values.

For make this, I've made one event:

public void SelectedChanged(object sender,EventArgs e){


            RadSplitButtonElement SendingSplitButton = sender as RadSplitButtonElement;
            RadSplitButtonElement[] ButtonArray = { orbit, rotate, horizontalMove, verticalMove, zoom };

 for (int i = 0; i < 5; i++)
            {
                ButtonArray[i].ActionButton.ButtonFillElement.BackColor = System.Drawing.Color.transparent;  <- Setting the original Values
                ButtonArray[i].ActionButton.ButtonFillElement.BackColor2 = System.Drawing.Color.transparent;
                ButtonArray[i].ActionButton.ButtonFillElement.BackColor3 = System.Drawing.Color.transparent;
                ButtonArray[i].ActionButton.ButtonFillElement.BackColor4 = System.Drawing.Color.transparent;              

            }
           /*Setting Selected Values...*/
            SendingSplitButton.ActionButton.ButtonFillElement.BackColor = System.Drawing.Color.FromArgb(255,255,115,0);
            SendingSplitButton.ActionButton.ButtonFillElement.BackColor2 = System.Drawing.Color.FromArgb(255,255, 115, 0);
            SendingSplitButton.ActionButton.ButtonFillElement.BackColor3 = System.Drawing.Color.FromArgb(255,255, 115, 0);
            SendingSplitButton.ActionButton.ButtonFillElement.BackColor4 = System.Drawing.Color.FromArgb(255,255, 115, 0);
            SendingSplitButton.ActionButton.ButtonFillElement.GradientPercentage = 0.62f;
            SendingSplitButton.ActionButton.ButtonFillElement.GradientPercentage = 0.71f;
}

I have already tried changing the State of the Objects in this mode:

SendingSplitButton.OnMouseOver = true or with SendingSplitButton.OnMouseDown= true but it doesn't work. I don't understand very well if it is possible or not managing only a single state of the object through the code and how the Style Managing - by code - and Xml is merged.

Thank you very Much,

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 09 Dec 2010, 02:33 PM
Hi Jean-Marc Windholz,

Thank you for contacting us.

I am not sure that I understand your question. Please specify in greater detail what exactly you want to achieve. OnMouseOver and OnMouseDown are methods inherited from the Control class and they correspond to the MouseOver and MouseDown events. You cannot assign values to them.

I will be glad to assist you further and I am looking forward to your reply.

Greetings,
Jack
the Telerik team
Get started with RadControls for WinForms with numerous videos and detailed documentation.
Tags
Button
Asked by
Jean-Marc Windholz
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or