I print the calculation results in the end of window title text. I want to highlight them. How to change text colour in the title and how can I make background for this text like in last versions of Microsoft Office?
If there's no way without drawing the non-client area myself I'd like to know how to draw the non-client area considering any system options set for windows titles.
Related
i am trying to accomplish the following behavior with a QML TextArea:
I want single Words in the Text to be colored differently
I want the "select"-functions to be working for automated scrolling (user interaction is disabled)
There is a stream of text in the TextArea where one Word needs to be selected(highlighted). The user is requested to input some text elsewhere and press enter to proceed (not part of the question). After that the selection jumps to the next word and the last selected word is either colored green or red. There is only a small portion of the text visible (a few lines, managed by the TextArea height – not part of the question) and i need the text to scroll if the next word is out of that visible range .. therefore the selection is quite helpful because all interaction from the user – to scroll or select or whatever – is disabled (disabling is not part of the question)
my main problem is: if i use textFormat: TextEdit.RichText i can easily color the text how i like it to be (<font color=\"green\">{}</font>) but i cannot use the "select"-functions anymore because – as i would guess – the selection works on the "plaintext" and cannot correspond to the "richtext"-selection? Anyway selectWord() etc. does not work QTextCursor::setPosition: Position '-1' out of range is the result. But if i disable the RichText i don't know how to color the text. Maybe i could live without the selection if i could detect the current word – which would be colored blue etc. – and scroll if its out of the visible area to "fake" the selection behavior, but that's just a third option.
I would really either know how to color non-Rich Text or how to select Rich Text in a TextArea.
You can use QSyntaxHighlighter to highlight the words independent of the selection. See QQuickTextDocument and How to implement rich text logic on QML TextEdit with QSyntaxHighlighter class in Qt for more details.
I would like to be able to select and copy the hover text in plotly graphs. Is that possible with the R API?
For example, in this heatmap, upon mousing over coordinates (X=a, Y=d), one can see the hover text displaying:
x=a,
y=d,
z=0.71886
However, the text is not selectable. The goal would be to e.g. display this text inside a box (perhaps by right-clicking on the corresponding cell) to be able to copy the text contents into the clipboard.
Any help would be greatly appreciated.
I implemented a button in TclTk with the text "Click". What I have to do is to write the text with different shades of green.
Is there anyway to make the text' color of a button to be green shaded?
The Tk button makes all of its text be a single colour (controlled by the -foreground option) as that's by far the most important use case for the large majority of users. Making the text vary in colour across its face is outside this use case, and so requires substantial trickery. The two ways I can think of are to use an image instead of a text label (when you can draw whatever you want on it, using the alpha channel to let the background show through) or to use a canvas widget to simulate a button.
Making an image (PNG, or GIF in 8.5 and before) is quite a lot easier.
I have a bar chart with a category axis which is dynamically populated with data.
Problem is when data text is too long, the whole chart moves up to accommodate the label size like so:
I've tried to search for a way to limit the label size (possibly clip the text with ...) but to no avail.
I've also searched for the actual node via chart.lookupAll method but it appears the node is of type Text which cannot be resized.
Any help would be appreciated.
I always seem to be having fun working with the Ax 2009 product until I have to touch the now deprecated reporting tool. Today I've been asked to highlight some column titles and a totals area with a grey or shaded background. The *tutorial_ColourLines* report isn't what I need as we do not want to colour the whole report section. We only want to change the background color for labels or better yet, inside a shape.
Thanks
Revisiting the TrucosAx.com link in Spanish I posted in the questions comments, I've obtained an imperfect way of producing the silver backgrounds.
Create a Text object but makes sure it is behind all of the other controls, by moving it up the list of objects in the report section.
Set the new object as having the same dimensions and position as our original column title or label.
Change the original column title background colour.
Change the foreground and background colour of our new text object as well.
Fill the text object's Text property with garbage: OOOOOOOOOOOOOOOOOOOOOOOOOOO etc.
Any better suggestion is most welcome.