RadSplitButton and Styles Managing

2 posts, 0 answers
  1. Jean-Marc Windholz
    Jean-Marc Windholz avatar
    42 posts
    Member since:
    Sep 2009

    Posted 03 Dec 2010 Link to this post

    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,

  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 09 Dec 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top