BlackBerry:List Field-How to Highlight only the text instead of the whole field - blackberry

I have a list field displaying text, and I want only the text to display as focused when the field is selected. Instead of the whole field being highlighted in blue, I want only the text to be highlighted.
I have found methods to change the highlight color, but not how to limit the area being highlighted.

I haven't tried this, but you should be able to do just override drawFocus() to do nothing (that will get rid of the highlighting), and then in your drawListRow() check if the row is the selected row, and if that's the case draw the text a different color.

Related

sheet/cell color change when print sheet

Is there a way we can use conditional formatting like when user print sheet to pdf or printer it will change color of Cell or cells ?
Maybe add button to cell with "ctrl+p" key binding so when it is clicked it changes color of specific cell.

How to toggle cell color when clicking on that cell

I'm trying to find function that will change (toggle) cell color when you would click on it.
For example, I have cell that that only has number "1" on it and it's default color is white, so when I click that cell (like you would on click on a checkbox) the color should now be blue. If you would click it again, the color should go back to white etc.
What I tried so far:
Using Dta validation to change checkbox value to text so that both TRUE and FALSE statements simply are written as number 1, but I got validation error that both states couldn't be named the same
Using Conditional formatting. so when checkbox is checked, color of that cell is changed (this works to some degree, but for some reason not when I use it together with Data validation)
Does anyone have solution on how should I approach this?
In theory it could be possible with the onSelectionChange trigger on an apps script function. It could be a simple function that:
Gets the selected or active cell range
If the background color is white, changes it to blue
If the color is already blue, changes it back to white
Changing color is already doable with the setBackground function.

How to conditionally add a clickable checkbox in google-sheet?

I have tried:
=if(B11="","","☐")
But I wanted to add a clickable checkbox and not just the symbol.
Ok, so sheet does not have a way to hide/show validation checkboxes, but I did find a work-around.
Add the checkboxes via Data/Data Validation
Set the fill color to black
Set the text color to white
Now, set up conditional formatting using a custom formula
=C20=""
Set text color to none
Set fill color to white
I built a tab in this sheet call Checkboxes so you can make a copy and experiment. In this sheet I just added the checkboxes using the Insert/Checkbox instead of via Data/Data Validation
https://docs.google.com/spreadsheets/d/1qbLOjTdzISICTKyUp_jK6gZbQCt-OwtDYYy3HNJygeE/edit#gid=1995409740

Text selected without showing the pins

Is there a way to programmatically select a text without showing the pins at the beginning and at the end of the selected text?
Example:
Although you should be more precise, I presume you just want to highlight some parts of the text with a background color. Therefore you can use NSAttributedString.
You can look up how to create an attributed String here and how to use background color on it here.

Conditionally formatting multiple rows with the same conditions

I am looking to format 500+ rows of data and essentially, G5-K5 (in every row) needs to be highlighted a light color (any color) if J5 equals "Regular".
This same condition will exist in every row, so it should be simple - but I am not an excel master by any means. I just don't think it's necessary to create 500+ conditions for each row!
That is actually pretty simple.
You right click one of the cells to do the formatting(one with
regular for example) and select Conditional Formatting on the menu.
Then you make sure the Range is the cell you right clicked, select
"The text is exactly" in the list and type "Regular in the field
under it.
Select the color under that field and press the blue button.
After that you just need to press the paint format tool(the paint
roll) and drag all the cells you want to have the same
behaviour(probably the entire column of the right clicked cell).

Resources