soledue Posted April 4, 2012 Share Posted April 4, 2012 I would like to color one button. how can I assign a css class to the button, or give it an id? 1 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 4, 2012 Administrators Share Posted April 4, 2012 Buttons are drawn using CSS theme. You need to play with CSS theme, but this will affect all buttons. Link to comment Share on other sites More sharing options...
soledue Posted April 4, 2012 Author Share Posted April 4, 2012 I found it Button.ExtControl.Id := 'my_id'; Buttons are drawn using CSS theme. You need to play with CSS theme, but this will affect all buttons. Link to comment Share on other sites More sharing options...
Mediv Posted April 4, 2012 Share Posted April 4, 2012 Put this into servermodule customcss .button { display: inline-block; outline: none; cursor: pointer; text-align: center; text-decoration: none; font: 14px/100% Arial, Helvetica, sans-serif; padding: .5em 2em .55em; text-shadow: 0 1px 1px rgba(0,0,0,.3); -webkit-border-radius: .5em; -moz-border-radius: .5em; border-radius: .5em; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2); -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2); box-shadow: 0 1px 2px rgba(0,0,0,.2); } .button:hover { text-decoration: none; } .button:active { position: relative; top: 1px; } /* white */ .white { color: #606060; border: solid 1px #b7b7b7; background: #fff; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed)); background: -moz-linear-gradient(top, #fff, #ededed); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed'); } .white:hover { background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dcdcdc)); background: -moz-linear-gradient(top, #fff, #dcdcdc); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dcdcdc'); } .white:active { color: #999; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#fff)); background: -moz-linear-gradient(top, #ededed, #fff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#ffffff'); use UniLabel.Caption = <a href="#" class="button white" target=_blank>...</a> Link to comment Share on other sites More sharing options...
Guest tendon Posted April 4, 2012 Share Posted April 4, 2012 Accessing ExtControl.Id gives me an access violation; and I don't see ExtControl as a property in the palette. Is it supposed to be private or protected somehow? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 4, 2012 Administrators Share Posted April 4, 2012 Accessing ExtControl.Id gives me an access violation; and I don't see ExtControl as a property in the palette. Is it supposed to be private or protected somehow? It can only be accessed in webmode. Link to comment Share on other sites More sharing options...
Guest tendon Posted April 4, 2012 Share Posted April 4, 2012 It can only be accessed in webmode. Farshad, what do you mean "in webmode"? I made the call from within... procedure TMainForm.UniFormCreate(Sender: TObject); ... should that be guarded with something like "if webmode then... " or what do you mean? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 4, 2012 Administrators Share Posted April 4, 2012 Farshad, what do you mean "in webmode"? I made the call from within... procedure TMainForm.UniFormCreate(Sender: TObject); ... should that be guarded with something like "if webmode then... " or what do you mean? if WebMode then begin end; Link to comment Share on other sites More sharing options...
Guest tendon Posted April 5, 2012 Share Posted April 5, 2012 if WebMode then begin end; Thanks, that worked. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now