I want to openTBS for dynamic highlighting of a paragraphs and lines of a docx that I am downloading from my website - document

Haven't found any tips on stack or on the documentation thus far. Any tips? Please note that I'm not using a table for the hightlighting

In Ms Word, the highlighting feature can only apply a limited number of predetermined colors :
yellow, green, cyan, magenta, blue
red, darkBlue, darkCyan, darkGreen, darkMagenta
darkRed, darkYellow, darkGray, lightGray, black
none
The Highlighting is different from the Shading which can apply any background color, including theme's colors. The highlighting color is applied over the shading color if any.
Now, OpenTBS can change any of those properties (highlighting or shading) since it is preexisting in the template. That is OpenTBS cannot create highlighting or shading background, it can only change the color (or turn it to no color).
In the DOCX, the XML element for an existing highlighting is placed in head of the highlighted snippet and is like this:
<w:highlight w:val="darkRed"/>
The XML element for an existing shading is placed in head of the colored snippet and is like this:
<w:shd w:val="clear" w:color="auto" w:fill="FF6600"/>
So now, the solution for having dynamic highlighting with OpenTBS is this :
In the template, select the part of text to have the dynamic highlighting, and add any highligh to it.
Inside the text, add a TBS tag with the "att" parameter: [myblock.mycolor_name,att=w:highlight#w:val]
At the PHP side, make sure the column mycolor_name have always a value in the list of color given above. This can be assured using a ondata custom function.
For having dynamic shading, it is quite the same :
In the template, select the part of text to have the dynamic shading , and add any color on it. Use only Standard color, not Theme colors, because the XML is a bit different for Theme colors.
Inside the text, add a TBS tag with the "att" parameter: [myblock.mycolor_value,att=w:shd#w:val]
At the PHP side, make sure the column mycolor_value have always a value wich is a hexa color value (like in HTML) . This can be assured using a ondata custom function.

Related

Openpyxl creating table with style generate unexpected color

I am using examples in openpyxl official example to create a style table in excel. For style, i am using the following
style = TableStyleInfo(name="TableStyleMedium13", showFirstColumn=False,
showLastColumn=False, showRowStripes=True, showColumnStripes=False)
I get the following result. Indicating I am actually get a style Aqua, Table Style Medium 13. However, I do not specify the Aqua color. What I want is the default blue color.
If I open a new excel and format a table, the drop down of table style will gives me Blue, Table Style Medium 13, which is what I want. But in the python script, I don't find the place to specify color option for TableStyleInfo, and it just default to Aqua.
Anyone help me out?

Change the font color in a field using lotus script or #command

Is there a way to change the font color and its background of a rich text field? The goal here is to get a type of color whenever a word is changed from a list.
For instance, I can have a table with two columns, where first column is related to a type of vehicle and the second it is related to type of combustible used. So, let's imagine that every time a vehicle uses gasoline, so its wording should be shown yellow text and the field background in black. On the other hand, if a vehicle uses electrical, its wording should be shown red and the field background in green...
I know that there is a command but I do not know how to use it for more than one value.
#Command([TextSetFontColor]; [Red])
Any help?
You can't change the font and color of the existing text in a rich text field with the Notes #formulas or #commands. There are some tricks you can do (e.g., multiple subforms containing the same field, with different backgrounds and fonts, and a computed subform formula, or maybe with multiple computed-for-display fields and hide-whens - but the text would not be editable that way) before the text is entered into the field. If you want to change the font of already-existing rich text, you'll probably need to use the Notes C or C++ APIs, the MIDAS Rich Text API from Genii software. I think the background will have to be done with computed subforms or hide-whens and computed-for-display fields (for non-editable rich text), no matter what.

Sublime Text 3 Find - highlight all results, rather than white outline

Find in Sublime Text 3 highlights one of the results, and a white outline of the other results. The white outline (any color outline) is very hard to see. Is there a way/package to highlight all search results?
Don't know if there's a way to have all the matches highlighted, but you can make them a lot easier to see by changing the colour and making the box thicker.
To do this, create your own colour scheme by adding a new .sublime-color-scheme file to the correct folder. For me (on linux) the simplest way is to copy the default color scheme file at ~/.config/sublime-text-3/Packages/Color Scheme - Default/Monokai.sublime-color-scheme to ~/.config/sublime-text-3/Packages/User/my_colors.sublime-color-scheme
Then add the following lines to the 'global' section:
"highlight": "var(orange3)",
"selection_border_width": "2",
To use your new colour scheme, select Color Scheme from the Preferences menu - there should now me a new scheme available called 'my_colors'.

how to find color code like '&HFFFF0000' format in photoshop?

I am working with aspjpeg component. there the color mentioned like &HFFFF0000 for red etc. How can I get a particular color code in this format?
That is a RGB code color. But I don't really get your point. If you are asking to change the color manually or select the color and then get the code. In both cases click on the black/white box is (left toolbar), select the color and you will see a little box where it shows you the code, or if you want to put a color manually write the code there and it will take you directly to the color.
Hope it helps.

I wish to apply a background color to ONLY the cells in a specific dataGrid column?

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.

Resources