Java Fx : strange behaviour when trying to write a Label vertically - rotation

I have noticed a strange behaviour concerning rotated texts (Label,...) in JavaFx...
Originally, I just wanted to be able to display Labels vertically in a GridPane. The first problem is that there is no simple way to tell a Label to display its content in a given direction/orientation. It would be nice to have something like the Side property of the tabPane which would allow to easily turn the text around...
Anyway, I then resigned myself to use the Rotate function to turn my Label. That is when the strange thing began to occur...I am putting my Label in a grid cell which would not be large enough to display the full text if it is not rotated but the text should be able to fit once rotated. The problem is that the text appears wrapped even when it is rotated as if the wrapping test were done before the text is actually rotated... The problem can be seen on this screenshot http://hpics.li/e210f2f : the text that should be displayed is written in the Tooltip and we can see that only the first letter of the rotated text is displayed in the cell grid even though there is more than enough space to display it all...
Anyone has any idea on how to solve that ? Is it the intended behaviour or is it just a little bug ?
Thanks in advance for your answers.

Related

How to remove the borders around images inserted over a cell?

Is it possible to remove the borders around images that have been Inserted Over a Cell?
In the example pic; The left-side is how it appears while editing the sheet, with no borders as desired. The right-side is how it appears in the published sheet, with an unwanted border.
example image
I have turned Gridlines Off in the View menu.
I have tried using the Border options, which don't affect the image. The border options only affect whatever cell is also selected (and one cell 'has' to be selected - I can't just select the image on its own. See next example pic)
example image2
Notice it appears that the image which i want to remove the border from is selected, but then also notice the cell to the right is also selected. The border option only affects the cell, not the image.
Changing the BG colour so that the borders cannot be seen isn't an option because i have various images and background colours.
Also, inserting the image as a Drawing isn't an option because any gif images are then static/unanimated.
Thank you.
edit: I did spend a lot of time searching for an answer for this and noticed someone asked a similar question almost 2 years ago, which received no answers.
Seems i will have to find a totally different app to use just because of that one issue. I'm not sure why google would force borders around images and have no option to remove them. I wish i had known that before completing everything and publishing it.

An easy way of setting a ZPL template as landscape rather than portrait?

Is there a simple way of setting an entire label to print in landscape orientation rather than portrait? I tried the FWR method but it doesn't seem to affect it at all.
I get the feeling i'm going to have to completely realign my fields and graphic boxes if i want to make it landscape.
^FWr command changes orientation of a field.
If you want to set whole label orientation, use ^POa instead, like described e.g. in Label Rotation and Orientation for ZPL based Desktop and Tabletop Printers document.
The ^PO command will only allow you to rotate in 180 degree increments, so that will not help you here.
Unfortunately, the answer to your question is "No." In order to switch between landscape and portrait modes, you will need to manually rotate/reposition/realign all your graphic boxes, text fields, and barcodes. (I feel your pain though, I've had to do this before and it is not fun.)

Exported shapes as image with vba in powerpoint with a white space in the button and top

I want to export certain shapes in powerpoint as images. For that I am using the following code:
ActivePresentation.Slides(1).Shapes(3).Export "C:\dink_template\created_files\testimg.jpg", ppShapeFormatJPG
I also tried with other image formats:
ActivePresentation.Slides(1).Shapes(3).Export "C:\dink_template\created_files\testimg.png", ppShapeFormatPNG
and I get this image:
Here you cannot notice because the white peace that appears in the image button (and also a bit in the top) is mixing with the page but if you make inspect element on the photo you will see it.
As you can see in this other image in powerpoint the shape fix perfectly and it is not bigger that the image:
Why is appearing this white peace in the top and in the button? How can I export the image without them?
EDIT
I know when it is happening. Because I try with other ones and sometimes they where not appearing and sometime it was. The problem is that when the text you write in the shape is so close to the border and you export it as image it export with this white space. Now the question is... how can I solve this?
One option would be to adjust the size of your shape and/or the size of the text accordingly to the total text length, before exporting it as an image, in order to make sure that your text will never be too close to the border...
Something else: have you checked the margins properties of your shape? Putting them to 0 might help a bit.

How to prevent overflow text in a text block?

I'm trying to make an ebook reader. I want each page to scroll sideways (like the Pivot viewer does) but I can't get out how to figure out how many words need to be added to the text box on a screen to before it starts overflowing (I don't want the user to scroll vertically).
Any tips?
Thanks!
There is a Scrollable TextBlock which divide text into blocks of 2048px height. You can use their code to get text that will exactly fit into one page (800px, for example)
Creating Scrollable TextBlock for WP7
If you call the UIElement.Measure(Size) method, then check the UIElement.DesiredSize property, it will tell you the size of an element before it is rendered. You could add text, repeatedly measuring the rendered size.
However ... this will be pretty inefficient. It is much better if you can create a layout that performs what you require automatically.

is there built-in way to make DevExpress XtraGrid GridView column headers/captions diagonal to save horizontal space?

I have a whole bunch of very narrow columns in a DevExpress GridView and I want to save on column header width by making the caption text (which is too wide even at 3-4 letter abbreviations) slanted / diagonal. Well, so I guess I could get rid of text captions and replace them with pictures of diagonal text, at least if GridView will allow sufficient height for the header.
Is there any built-in way to just display the rotated text without going the image way? I don't think I am the first programmer out there trying to squeeze out horizontal space like that, so this doesn't sound like an outlandish thing to support in a popular grid component :-)
If not, and so I do have to use an image for column header, any relevant suggestions or warnings?
XtraGrid does not provide a built in functionality to show column header captions this way. However, this can be done within the CustomDrawColumnHeader event handler. We have posted a tutorial showing how this can be done. By default, it should be located at:
C:\Users\Public\Documents\DevExpress 2010.2 Demos\Components\WinForms\XtraGrid\CS\GridTutorials\GridVerticalHeaders
NOTE, as this feature is implemented using custom draw. It means that this text is only painted this way. Custom drawn text won't be exported or printed.

Resources