How do I align the header text in TableColumns? - header

How do I align the text in the header of my JavaFX TableColumns (both TableView and TreeTableView)?
(The javadoc for TableColumn doesn't have one word on alignment and barely anything on the header.)
Thanks.

Try using this css:
.table-view .column-header .label{
-fx-alignment:CENTER_LEFT
}

Related

Appcelerator: How to create Ti.UI.TextArea dynamically adjusting to content but with minimal height

I want to create a Ti.UI.TextArea object which would dynamically adjust its height to content but would have default height set (if no content). In Appcelerator if you don't specify height then it will automatically adjust its size to content but if there is no text then its size will be similar to textField. This is to small for me.
If you specify height property, then TextArea height won't change even if text will be longer than editable region.
I would like to have something like this:
var textArea = Ti.UI.createTextArea({
minHeight: 30,
});
or like this:
var textArea = Ti.UI.createTextArea({
minLines: 3,
});
I am looking for solution both for Android and iOS.
Is there any workaround for that?
You can change the height of the textField dynamically.
Add onChange event handler and change the height of the textField dynamically according to the number of lines in the text field.
Starting with 7.5.0.GA you can use maxLines on Android to be able to extend the TextArea to when pressing return. For iOS you have to create a work-around since there is no parity at the moment.

remove thumbnail text in amazing slider

I want to remove thumbnail text in amazing slider, but the problem is it removes bottom text in slider, too. Is there any solution to keep bottom text as special effect in amazing slider and remove the thumbnail text
If You Want To do it using jQuery then you can use following code:
//Copy and paste in to your js Code
jQuery(document).ready(function(){
jQuery(".amazingslider-bullet-text-0").remove();
jQuery(".amazingslider-bullet-image-0 img").css("height","100%");
jQuery(".amazingslider-bullet-image-0").css("height","100%");
});
https://amazingslider.com/examples/jquery-image-gallery/
firstly, find following text--
this.options.watermarktext in the amazingslider.js
if you got it like
this.options.watermarktext = this.options.vermk;
and replace it with
this.options.watermarktext = "";
It have worked for me.

Nested List "Back" button overlapping toolbar title?

I have created a nested list. When the text of the selected item is quite long than back button overlaps the toolbar title.
Is there any way to align toolbar text to right or set font size??
Any help is appreciated.
You can use only "Back" (or something else) for the back button. You just need to add this config in your nested list: useTitleAsBackText: false (It is true by default).
Else, you can reduce the font size for both button and toolbar title in your CSS file. Like this:
.my-nested-list .x-toolbar .x-button-label,
.my-nested-list .x-toolbar .x-title {
font-size: 13px;
}

monotouch dialog cell sizing and section caption color

I am using monotouch dialog to generate a view. I managed to change the background color by subclassing DialogViewController, but the contrast with the section caption makes the text hard to read. How do I change the section caption color?
I am also using a StyledStringElement as a button in the same view. I cant seem to figure out how to shrink this element so that it looks more like a button. Please provide examples. Your help is appreciated.
To solve this issue I used a glassbutton with the it's HandleTapped handler as below.
var butt = new GlassButton(new RectangleF(80,150,150,50))
{
Font = UIFont.BoldSystemFontOfSize(22),
NormalColor = UIColor.Red,
};
void HandleTapped (GlassButton obj)
{
}
as for the colors, I used miguel's solution here. Hope this helps someone down the road.

How to center a NSTextField in a view

i've a NSTextField (label) centered with IB in a view with the text "__DRAG_AND_DROP_YOUR_MEDIA_HERE". In my controller a use NSLocalizedString to translate the text :
English.lproj/Localizable.strings :
"__DRAG_AND_DROP_YOUR_MEDIA_HERE" = "Drag & Drop your media here"
French.lproj/Localizable.strings :
"__DRAG_AND_DROP_YOUR_MEDIA_HERE" = "Déposer vos média ici"
Only the initial text "__DRAG_AND_DROP_YOUR_MEDIA_HERE" is centerred in the view. The translated text is not centerrd (depending on is lenght). All the translated text start at the same absciss x than the orignal text. How can i fix this issue ?
PS: I don't want to play with setFrame, height, width just for a simple point like this. I guess there's another method to do this.
Thanks.
Set the text field's alignment to NSCenterTextAlignment. You can do this from IB or programmatically using -setAlignment:.