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

RadTexVox Style

1 Answer 111 Views
Input
This is a migrated thread and some comments may be shown as answers.
Eon
Top achievements
Rank 1
Eon asked on 08 Aug 2016, 09:12 AM

Good Day All,

I am looking into changing the default color of the Radtexbox when either hovered or clicked on.

You will see in Picture 1 that it is just a normal input box, now in Picture two you will see it highlights blue when clicked on, I wane change that color

to something else, how would i accomplish this?

 

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 09 Aug 2016, 11:28 AM
Hi,

Here is a simple CSS code how to change the input styles for RadInput and RadFormDecorator to use the provided blue color when the element is hovered:

<head runat="server">
    <title></title>
    <style>
        body {
            font-size: 14px;
        }
 
        /* RadInput styles styles */
        span.RadInput_Default:hover,
        span.RadInput_Default:active,
        span.RadInput_Default:focus,
        span.RadInput_Default.RadInputHovered,
        span.RadInput_Default.RadInputFocused,
        span.RadInput_Hover_Default,
        /* FormDecorator styles */
        .RadForm_Default input.rfdTextInput:hover,
        .RadForm_Default input.rfdTextInput:focus,
        .RadForm_Default input.rfdTextInput:active {
            border-color: #3c87c8;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server"></asp:ScriptManager>
        <telerik:RadFormDecorator runat="server" DecoratedControls="All" RenderMode="Lightweight" />
        <asp:Label ID="Label1" runat="server" Text="RadTextBox" Width="150px"></asp:Label>
        <telerik:RadTextBox RenderMode="Lightweight" runat="server" ID="RadTextBox1"></telerik:RadTextBox>
        <br /><br />
        <asp:Label ID="Label2" runat="server" Text="FormDecorator Textbox" Width="150px"></asp:Label>
        <asp:TextBox runat="server"></asp:TextBox>
 
    </form>
</body>
</html>

Note that for the example a Lightweight rendermode is used.

Regards,
Bozhidar
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Input
Asked by
Eon
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or