I can't seem to find this.
What method (and constant) do I use to align the tabs in a JTabbedPane.
I Found how to switch between Top and Bottom. But I'm trying to put them in the center at the bottom.
So that it looks like this
ooooooooooooooooooo
o..................................o
o..................................o
o..................................o
o..................................o
ooooooooooooooooooo
...... |Tab1||Tab2|
Thanks
You can't. This layout rule is enforced by the selected look and feel.
You can write your own UI-Delegate for JTabbedPane component that extends BasicTabbedPane class and overwrite the
method 'getTabInsets(int, int)'. Change value of 'tabInsets' atribute ( default value is: new Insets(0,4,1,4), centered).
Related
This is my problem: i have this html
as you can see there are two <div class="sc-fjhmcy dbJOiq flight-information"></div> and, i want to get the element using the class attribute, but only with the flight-information value, because
I think the part that is written as nonsense code ("sc-fjhmcy dbJOiq...) change daily
I have already tried with this xmlpath, $x('//div[contains(#class, "flight-information)"'], but its not working,
What could I do?...
I checked your code and I think that there is no big issue with this.
You need to use one class name to get the element, not two names, as below.
$(".sc-fjhmcy")
Then, this will be run correctly.
Best regards
I'm new with primeNG and p-tableCheckbox.
I'm using this component to create a checkbox column to check/select the right row. So the normal standard and behaviour works perfectly. But now I need to select by default some row/checkoxes by component.ts.
I'm searching everywhere and I don't find anything about this behaviour.
I tried something like this
<p-tableCheckbox #tableCheckbox [value]="rowData" [index]="rowIndex"></p-tableCheckbox>
checkSelected(event) {
this.checkboxSelected.emit(event.data);
this.tableCheckbox.checked = true;
}
where but obviously doesn't work. How can I make it work?
With p-table pass selected objects like
<p-table [(selection)]="selectedRowDataArray">
This will automatically mark required checkboxes as selected.
The ActionBar shows a space on the left side of the custom view.
I want to set my custom view align left of Actionbar.
I'm trying to set
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
and any other method like setLogo(null),But it's not work.
My code is like
ABCMainView actionLayout = new ABCMainView(this); //my custom view
getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setCustomView(actionLayout);
My ActionBar is android-appcompat-v21.
How can i do this?
Try with this in your Toolbar xml config
android:contentInsetStart="0dp"
Base on Chris Banes' response https://stackoverflow.com/a/26495926/1568429
Hi guys im creating/adding elemnts in my item renderer but from some reason you cant access their specific properties, you can only change the general properties. I created a LABEL component but when i do LabelName.font , nothing happens, its like flex doesnt recognize that this is a LABEL. Here is my code
var mylabel:Label = new Label()
mylabel.font
when i do "mylabel.someProperty" it only shows the general properties of any component, but how can i change other properties like font,color,size etc..
Thanks ahead [=
Fonts are defined as styles in Flex, not propeties, so you need to use the setStyle method to update it. (Not my favorite part about Flex.) For example:
myLabel.setStyle('fontFamily', newFont)
There is a difference between MXML and ActionScript in this. In MXML, styles of a component are shown as if they were properties, when they are really not. To set the fontFamily of your label in AS3 code, for example, you would use
myLabel.setStyle("fontFamily", "Arial")
Please note the remark mentioned WORKAROUND at the end of this question.
Based on a Dictionary based specification, one of my classes creates a Form programmatically.
Adding TextInput or DatePicker to FormItemss works as expected.
Unfortunately, the following code just creates a colored rectangle, not the actual picker:
ti = new ColorPicker();
ColorPicker( ti ).selectedColor = TAColor( _spec[ key ].value ).color;
and later on
formItem.addElement( ti );
The Form is embedded in a TitleWindow component presented using
PopUpManager.addPopUp(...);
When added to TitleWindow, it shows up correctly, within Form->FormItem not:
I can't image, why the picker doesn't appear. Do you?
WORKAROUND:
If I wrap the ColorPicker inside a Group things work:
ti = new Group();
Group( ti ).addElement( new ColorPicker() );
In this case, the ColorPicker appears as editable.
Still, I'd be too happy to learn what the problem with my initial solution. Bug?
A DateField (which extends ComboBase like ColorPicker) behaves properly in a spark Form. But in the ColorPicker, the mouse down handler of the button never gets called. I think that maybe the skin part that handles the mouse clicks (it must be a button) is not properly dimensionned, and the result is it is not shown. I've come to this conclusion because within an mx Form, the ColorPicker doesn't display as it does when it is added to the regular displaylist...
Hope this helps...
In the code you've provided, you never add the colorPicker as a child to any parent container; as such it will never show up anywhere.
You probably need to do something like:
formItem.addChild(ti );
[or for a Spark formItem]:
formItem.addElement(ti );
I'm confused as to why you're seeing a rectangle.