How to change the color of rows and text in aggrid on selection - ag-grid

I have a Aggrid and have to change the color of row and text from default blue and black to green and white when we select a row in Aggrid.
I tried making use of this, but the color of links in text does not change to white

It is not related to ag-grid. All you need is to add different CSS rule for links inside a selected row, to override link color (and also, probably, :hover, :active, :focus states).
.ag-row-selected A {
color: while;
}

Related

How can i change the selection of textfield copy paste options

1)Take Input from Text Field and Input will show on bottom of Text field and Input has multiple Words.
2)Long press on single world It will appear a toast with multiple option opy ,paste ,change color .
3)Click on change color option selected Word should be change color .
4)Click on double click It should be redirect with same words.
Add addition menu item using UIMenuController, something like this:
let changeColor = UIMenuItem(title: "Change Color", action: #selector(changeColor:))
UIMenuController.shared.menuItems = [changeColor]
You can make the changes in changeColor function and update textfield's content from there with your color attributes.
Double-tap is used to show menu controller options, changing that may not be straight forward change. You need to explore swizzling to achieve that.

How to get standard system colours for custom widget

I am writing a custom widget using gtkmm and I would like to use the standard selection colour when part of my widget is selected. For example when you select text in a text box, the background colour goes (for me) dark blue, so I want to obtain this same dark blue colour.
I have tried this, but I only get black or white, not the actual colours in use:
bool MyWidget::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) {
Gdk::Cairo::set_source_rgba(cr,
get_style_context()->get_color(Gtk::STATE_FLAG_SELECTED));
}
What is the correct way to obtain the standard colours with gtkmm, such that if the user changes their colour theme, the changes will also be reflected here?
Or is it considered best practice to define some new CSS styles which inherit from the standard system ones, so that people can override colours for just my widget if they desire, without affecting others?
Turns out the answer to this is that what I was doing in the question was correct, except there were no styles applied to the widget so the colours were just black and white.
I had to add this in the widget's constructor:
this->get_style_context()->add_class(GTK_STYLE_CLASS_ENTRY);
To get text entry styles. Of course this made render_background() as suggested by ebassi render a text entry background instead, which isn't what I wanted (I just wanted a solid colour.) So instead I changed the above line (in the constructor) to:
this->get_style_context()->add_class(GTK_STYLE_CLASS_DEFAULT);
And in my render function, temporarily set text-entry styles just to get the colour:
auto cxStyle = this->get_style_context();
cxStyle->context_save();
cxStyle->add_class(GTK_STYLE_CLASS_ENTRY);
Gdk::Cairo::set_source_rgba(cr, cxStyle->get_background_color(Gtk::STATE_FLAG_SELECTED));
cr->fill();
cxStyle->context_restore();
This way I was able to obtain the text selection colour and fill a rectangle behind the area of my custom widget that should be shown as currently selected.
I couldn't use render_background() here because it would have drawn the background of a text control which I don't want, I just wanted a solid filled rectangle.
The proper way to render the background of a widget is to use gtk_render_background(). This function will take into account widget state and style.
Your code above becomes:
bool
MyWidget::on_draw (const Cairo::RefPtr<Cairo::Context>& cr)
{
double w = get_allocated_width(), h = get_allocated_height();
Glib::RefPtr<Gtk::StyleContext> context = get_style_context();
context->render_background(cr, 0, 0, w, h);
return true;
}
This way your widget will always be updated to reflect the theme.
If you want to control the color and style of your widget you should use an additional Gtk::StyleProvider for your application to load a custom CSS fragment with the desired style classes.

change part of the text color in UiBinder

I have a text:
<g:Label ui:field="titleLabel">text RedText someMoreText</g:Label>
Now I'd like to make RedText red. I can't set any widget inside <g:Label> tags, or html elements. But how is this done then?
One way is that you can use <g:InlineLable> inside your <g:Lable> and then style the InlineLable with color Red. Or you can use <span> element with an id/class as per requirement and style it accordingly to red color.

Reference for phClr in openxml

I am trying to find value for phClr, but no results.
Slide master is not having mapping for phClr.
I am aware that phClr is just a passed-in color value, but what exactly is its color reference?
Is it bg2 or anything else?
http://msdn.microsoft.com/en-us/library/cc964302(v=office.12).aspx
Blockquote
The scheme color value is set to placeholder color (the value phClr). This value appears throughout the fill, line, effect, and background styles and indicates that the settings are applied to the theme color applicable for a given style. This allows the same fill, line, and effect styles to populate across the theme colors that appear in the OfficeArt galleries.
“phClr” is a kind of placeholder color

Checkboxes in Xcode

What I'm wanting to do is add checkboxes and have a title for each checkbox and have if certain boxes are checked then it displays certain texts like
if box 1, box 2, box 4, and box 5 are selected then displays text1
if box 1 is selected then displays text2
if box 1, box 3, and box 4 are selected then displays text3
Something like that. Help would be appreciated. Thanks.
For the UI use a UiTableViewController with two images one for unchecked and the other for the checked state. Those images are assigned to the UITableViewCell's imageView property.
For checking state, I would store all values into one int field and make a corresponding typedef enum so that i could use a bitwise & to check to see if a value or combination of values is selected.
I could post some code later if needed.
You can use UISwitch controls for a simple on/off control, and UILabel controls for text. You could have a single UILabel whose text changes, or multiple ones and mark them hidden depending on which switches are on.