Ticket DQ16996
Visible to All Users

Style Repository or default controller for cxButton

created 19 years ago

Is there anything like default style repository or controller for cxButton as there is one for default edit style controller?
This will help make setup in default style for button which will used thru out the application. Please guide.
Thanks

Comments (3)
DevExpress Support Team 19 years ago

    Hi!
    You can use the cxLookAndFeelController component. If the cxButton's LookAndFeel property is not assigned, the cxLookAndFeelController's settings will affect the cxButton. I hope this will help you.
    Thanks,
    Nicolas.

      With cxLookandFeel Controller you can change the style of button, like flat, office11 etc…but i was looking for something to give the colors for the button. Like default, disabled, hot, normal, pressed color.

      DevExpress Support Team 19 years ago

        Hi!
        Unfortunately, the cxButton does not support the styles technology, so you cannot implement the task via the cxDefaultEditStyleController. One possible solution is to use a particular cxButton as a template. All others can assign the template's color as follows.

        procedure TForm1.FormCreate(Sender: TObject);
        var
          I: integer;
        begin
          for I := 0 to ControlCount - 1 do
          if (Controls[I] is TcxButton) and (Controls[I] <> cxButton1) then
            TcxButton(Controls[I]).Colors.Assign(cxButton1.Colors);
        end;
        Thanks,
        Nicolas.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.