styling

Styling components by extending their class

杀马特。学长 韩版系。学妹 提交于 2019-12-12 19:13:42
问题 From this question Passing object in reference / one place to style objects I was just thinking, what about if I created a descendant class for the item I am styling. eg (excuse the poor code, not in ide, but you should get what I mean) TStyledButton = class(TButton) public constructor Create; //This overrides the main TButton end; constructor TStyledButton.Create; begin inherited; self.Color := clRed; end; Then in my form I just have the Button1 as a TStyledButton instead. This would remove

How to set the background color of a checkbox's content by binding in WPF

六月ゝ 毕业季﹏ 提交于 2019-12-12 09:44:31
问题 I am trying to figure out how to bind the background color of the content for a checkbox. Here is the code I have, of course the background setting just changes the color of the checkbox not the color behind the text. <ListBox Name="ListBox1" ItemsSource="{Binding Path=relationshipTypesTable.dataTable.DefaultView}"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <CheckBox

WPF Listbox - Empty List Display Message

非 Y 不嫁゛ 提交于 2019-12-12 09:31:49
问题 Can anyone suggest the best way to display a Textblock (with a text such as "List Empty") so that it's visibility is bound to the Items.Count. I have tried the following code and can't get it to work, so think that I must be doing it wrong. <ListBox x:Name="lstItems" ItemsSource="{Binding ListItems}"> </ListBox> <TextBlock Margin="4" FontStyle="Italic" FontSize="12" Text="List is empty" Visibility="Collapsed"> <TextBlock.Style> <Style TargetType="{x:Type TextBlock}"> <Style.Triggers>

Vue v-model with css styling?

扶醉桌前 提交于 2019-12-12 04:09:12
问题 It is hard to explain this problem, so i think i will start by showing what i have: Vue.component('list-component', { data: function() { return { newTask: "", taskList: [], newSubTask: "", subTaskList: [], }; }, template: '<div>' + '<section class="prefetch">' + '<input v-if="showInput" class="input typeahead" type="text" placeholder="mainInput" v-model="newTask" v-on:keyup.enter="addTask">' + '</section>' + '<details v-for="task in taskList" v-bind:key="task.text" class="sub-list-item">' + '

Is it possible to change table row colour if it contains a certain value in a gsp?

笑着哭i 提交于 2019-12-12 02:56:37
问题 I have a table in a gsp containing 10 deiiferent values : <table class="table table-striped"> <tr> <th scope="row">Name:</th> <td> ${person.name} </td> </tr> <tr> <th scope="row">Address:</th> <td> ${person.address} </td> </tr>............ I need to highlight (either change the background or text clour on some of the values if they are present in an array also available in the gsp. Is this possible? For example using g:if? Like : <tr> <th scope="row">Name:</th> <td> <g:if ${array}.contains("$

jQuery dynamic element - styling not being applied

半世苍凉 提交于 2019-12-12 02:33:24
问题 I have 2 Button which when clicked either add a new paragraph or remove a current paragraph. This is done using jQuery . I am also using jQuery to change the color of the paragraph text from black to red on hover . The problem that I am having is that after I add a new paragraph with jQuery , the hover effect is not being applied to it. It works for the original paragraphs but not for the ones that are being created dynamically. When I look at the source code of the page I see that the

how to solve javafx table-view focused problem?

て烟熏妆下的殇ゞ 提交于 2019-12-12 01:26:23
问题 I have a problem in javafx table view focused problem. This is my table view when unfocused as shown in figure. The table view when focused : But when i am outside of the table view and click show-hide-column button the table does not get focused how to solve this problem using css if possible. or any other tricks....??? 来源: https://stackoverflow.com/questions/53699589/how-to-solve-javafx-table-view-focused-problem

How To Freeze Columns in GridView

笑着哭i 提交于 2019-12-12 01:08:54
问题 I'm trying to freeze columns in gridview where grid has static height and all rows are rendered(no paging and scroll var is visible). I only managed to add scroll through content by overflow property,but this time all columns are scrolling as well.My task is to freeze columns while maintaining column width . Let this be my grid <div style="height:200px;overflow:auto;"> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" UseAccessibleHeader="true or false"> <Columns> <asp

How to style PushButton's image size on hover/pressed in Qt4 using CSS

拥有回忆 提交于 2019-12-12 00:44:46
问题 I want to have a QPushButton where the image resizes on hovering with the mouse. The following works for QToolButton: QToolButton { border: 0px; } QToolButton:hover { padding: 2px; } QToolButton:pressed { padding: 4px; } ... the image gets resized (because padding changed). But when applying this to a QPushButton, it fails (image does not resize). I did it the same way: QPushButton { border: 0px; } QPushButton:hover { padding: 2px; } QPushButton:pressed { padding: 4px; } When the border is

Rails, CSS, form_for checkbox styling

☆樱花仙子☆ 提交于 2019-12-11 20:49:19
问题 I want to change the background color of the checkbox after it is ticked. I have: input[type='checkbox'] { background: green; } Doesn't seem to work. Any suggestions? Thanks in advance! 回答1: You should use custom checkbox to do this. iCheck or prettyCheckable more Here 来源: https://stackoverflow.com/questions/26348891/rails-css-form-for-checkbox-styling