I can place the legend top, middle, bottom, but its always on the right side of the graphview. How can I place it left side?
The most important problem that "too long" texts doesn't fit in the box, so the end of the text is outside the box / screen. I know I can change the text size, but I don't want to solve the problem in this way.
This solved my problem:
graph.getLegendRenderer().resetStyles();
Just called if I need to resize the legend box.
in the current version it's also possible to freely set the position of legend and also the width
Related
I need to create a UI where, as the user types, the cursor/typing area stays in the middle of the page and the newly typed text is pushed 'up and off' the top of the page.
I've tried to set the cursor position to the bottom of a text view which covers 0.6 of the superview but that doesn't work (presumably because it doesn't have any text?). This is a great answer for general cursor placement but my use case isn't catered for.
The code I used to try place the cursor at the end of the text view is :
func setCursorPosition() {
let newPosition = textViewOutlet.endOfDocument
textViewOutlet.selectedTextRange = textViewOutlet.textRange(from: newPosition, to: newPosition)
}
This doesn't work because it is looking for filled in text but sometimes the text view would be empty and I'd still need to load it on the bottom line.
The effect I'm trying to create would look like this :
quite a complex problem I think - any ideas?
For people who have this problem in future. I solved this by coming at it from a different angle. Rather than attempting to place the cursor half way down the page, I removed the height constraints and made the text view dynamically resize based on the content.
Then I adjusted the constraints (helped by this answer) to fix the space to the bottom safe area but didn't specify a height.
This way, the text view dynamically resizes but in an upwards direction. When it reaches the gradient I have placed over the frame it starts to fade out.
Perfect (I also disabled scrolling to make this work)
Top tip - if something seems really hard there might be a different way to approach the problem!
When I toggle panels I get an empty space in my workarea.
Pic is the example. Red area is not used.
Already tried:
Use mouse to move borders.
Togle view/apparance
Solution: F1 > toggle centered layout Found it in github issue https://github.com/Microsoft/vscode/issues/53778
go view->apperance->toggle centered layout.
Happy coding :)
I have placed buttons inside a horizontal box inside a window. Now I want this box to be on the top of the window with the smallest possible height. The rest of the window is drawing area for an image display that changes height with the window. How?
I solved it using a table with the following for the first and second row
gtk_table_attach(GTK_TABLE(table),toolbar,0,1,0,1
,GtkAttachOptions((guint)GTK_FILL|(guint)GTK_EXPAND)
,GTK_SHRINK,0,0);
gtk_table_attach(GTK_TABLE(table),test,0,1,1,2
,GtkAttachOptions((guint)GTK_FILL|(guint)GTK_EXPAND)
,GtkAttachOptions((guint)GTK_FILL|(guint)GTK_EXPAND),0,0);
I am currently designing a report using iReport 4.7.0. At the moment I am trying to figure out how to dynamically adjust the height of a textField, if its contents is too big for the initial height. It seems, that the option Stretch on overflow achieves this. But I am having problems with that.
If a textField is not stretched, the spacing before and after the text is good, because its achieved by setting the textField height higher than the font size. But if the textField gets dynamically bigger because the containing text is to long to display with the initial height, the lines seem awfully packed, there is no spacing whatsoever.
I tried so resolve this by setting Spacing before and Spacing after for the specific textField but this seems to end in JasperReports thinking, that the textField doesn't need to re-size at all, even if the text is not fitting.
Is it possible, that the size created by the Spacing before and Spacing after option is taken into account on calculating, if a textField needs to be resized on overflow? Or am I doing something wrong here?
Use padding:
Right-click an element
Select Padding and Borders
-or-
Right-click an element
Select Show Properties
Click the Borders tab
Set padding values as required
This should provide a constant spacing even if box resizes. For complex layouts, experiment with float position of elements, as described here.
I would like to have a GnomeCanvas text item and according to its content (and the content language) decide whether to align the text to the right or to the left.
I found one way to do it by changing the anchor property, but using this method would require me to manage the anchor position myself (change it to the right of the text bounding box when aligning to the right), and it seems there must be a simpler way.
EDIT: I see there is also the justification property, which allows me to align the text to the right. However, I still need to set the anchor point according to the language, instead of setting a bounding box that would apply to any language.
Its about a month without another answer. I guess my first understanding was correct and there isn't another way with the canvas. My solution would then be to change the anchor to east and change the anchor point accordingly.