When I set empty value in input, a jscolor inserts unwanted FFFFFF.
Second: Is it possible to jscolor returning transparent?
First
I was able to set the jscolor labels with this:
$('#your-jscolor-element').val(elementColored.style.backgroudColor);
Note: I was using elements.
Second
I haven't found a way to use jscolor with transparency. So I used a workaround of creating a button to remove the color from the element that the particular jscolor instance was modifying. I suppose if you are getting color in rgb, maybe you can get those RGB values and then use them to write 'rgba('+yourR+','+'yourG'+','+yourB+','+'0.2)' to the element's style rule.
Related
I wanted to know if the following is possible:
I've got an oData which has two fields related with colors
Colors are set as RGB because I thought it would be easier to pick them up to use it as styles in frontend.
I have a table in which I want to assign these colors to a specific cell, depending on 'ORGNA'.
I would like the row to have background-color red where Especialidad="UROLOGIA" (for example), but that color must come from the OData values I've got stored(see first image).
'ORGNA' values are the ones shown as 'Especialidad' (which means that 39ONC would be shown as 'Oncologia' and so on in the table).
I also wanted to know if this is possible or they must be set specifically from a Styles.css file.
Maybe there's some property like setColor or is there any way to add a background-color tag inside my XML View passing that OData values?
If you need any additional code, please just let me know.
I am trying to get the colour of a set of conditional formatting's rule.
Here an example:
I am trying to get the colour of the arrow with the following method:
Sheet2.Cells(rwIndex, colIndex).Interior.ColorIndex
But is not working as I expected.
I tried to use also this function Sheet2.Cells(rwIndex, colIndex).Font.Color
And surprise, as I expected I get the desired colour.
Is there a way to get the colour of the arrow of the conditional formatting?
I found two helpful pages:
To get the background color of the cell if a Conditional Format is applied, you'd need:
Range.DisplayFormat.Interior.Color , see e.g. this page: http://www.cpearson.com/Excel/CFColors.htm
For the icons: you'd need to loop through the Range.FormatConditions and check which one applies. But still, I haven't been able to find the color of the icons, this is the list of all available icons: https://bettersolutions.com/excel/macros/enumerations-xlicon.htm and this are the IconSets: https://bettersolutions.com/excel/macros/enumerations-xliconset.htm , however, there seems to be no way to check out which individual icons are in an IconSet (which would be practical if you would make a custom set).
Hope that gets you started!
Is it possible to text of the labels on a form column? We want to change the label for Customer Reference just on SO301000 which I can do with SetDisplayName, but even the standard label does not fit the current column width. I would like to make the label a little longer and it would look better wrapped.
One thought to wrap the text is to insert a line break HTML tag in the display name. The only issue with this I found is I had to add a hidden label field below the field I wanted to wrap because it caused a layout issue with the field below it.
PXUIFieldAttribute.SetDisplayName<Location.taxRegistrationID>(cache, "Tax <br/> Registration");
I asked this question on the LiveCode email list. No response, so I figure it must not be possible. I know about editing the template graphic that enables alternating row colors. That doesn't help me.
This lesson is the closest to what I have found, but it only sets the overlay color to empty cells. It also had an unwanted affect, where any data that was present in the grid no longer shows up.
http://lessons.runrev.com/s/lessons/m/datagrid/l/7327-how-do-i-override-the-default-behavior-for-rendering-data-to-a-cell
As a little experiment, since the data became invisible (note that I'm on WinXP), I tried placing an opaque graphic over the column I wish to colorize. I set the ink of the graphic to AddMax or AddOver, and it looked nice, but the text in the cells disappeared. Then I tried setting the ink to AddMin, and it still looks good, but the test shows through!!!!
So, I think this will work fine visually, but how can I pass a double-click through this graphic to the cell underneath (to allow cell editing only within this column)?
Yes, you can do this.
This suggestion comes from Trevor DeVore at http://www.bluemangolearning.com/
Create a custom column template using the property inspector. From there you can edit the behavior of the column to colorize the background color of the field for that column or just edit the field in the template group to change the color.
The background color will only show up in rows that have data, however.
In Dynamics AX 2012, is there a way to change the background color of multiple cells to different colors?
Order Status Ship Status Order ID
[green] [red] SO-1234
[green] [green] SO-1235
[red] [red] SO-1236
I've written a displayOption override that can change the color of one cell, but it seems to apply all the changes at the end, so whatever the last color you specify is the one that gets applied to all cells.
_options.backColor(46080); //green
_options.affectedElementsByControl(OrderStatus.id());
//is there anyway to apply the first change, so I can make a second one?
_options.backColor(255); //red
_options.affectedElementsByControl(ShipStatus.id());
In the code listed above, both cell background colors would be red.
Any suggestions?
Thanks
I had a similar task to accomplish, and I did not find a way to do it in Ax (well, techinically you could try Table control, but I strongly encourage you NOT to do so - you will end up swearing out aloud).
What I did is implemented a WPF user control and used this post as a template.
This is a small tutorial (found in Answer #7) which shows how to implement a cell background converter in built-in WPF data grid control, to accomplish the task.
After you have it implemented you can populate your datagrid by using LINQ (if using AX 2012 R2), web services, or passing a temporary table - there are many ways to access AX data.
It may not be the ultimate solution, but it works.
I did it using a table control ( although Maciej advised you not to do ).
It works without problems.
You need to add a table control which gets your data and set the property
ColorScheme to RGB
Then, override the FormControl editControl(int column, int row)
You can access each value by value = data.cell(column, row).data(); whereby data is the name of the table control.
Beware, that you have to add a control with the correct datatype to the table control and give it a name. Also set the ColorScheme property to RGB.
If you got RGB values for your desired background color, setting this color can be done by
RealEdit.backgroundColor(WinAPI::RGB2int(real2int(R),real2int(G),real2int(B)));
RealEdit is the name of the added control.
I've done this to display a matrix filled with values between 0 and 1 and to display a color gradient overlay with a range from green to red. See this link, if you like more information about the color conversion.