I am using Polymer paper-tabs - all working fine.
I want to programmatically select a paper-tab, and show it as selected/highlighted. Functionally there is no problem, but the tab is not showing "the correct colour" (=as highlighted).
I have used:
PaperTabs mypaperTabs=...
mypaperTabs.selected = "#mytab';
and
myTab.click();
The previously selected tab does correctly become unselected. So it is showing as all tabs as unselected. Is there something else I should be doing?
You need to assign the number of the tab to selected not the value of the id attributed.
For example:
mypaperTabs.selected = "1';
Related
We are using Vaadin gridpro v23.0.2 with Grid.SelectionMode.MULTI.
When I click on the select all check box all the record are selected (getAllSelectedItems), but the interface (view) is not updated, some rows of the list remain unselected. If i call refreshAll on the data provider than the rows are shown as selected. Is it a bug in the gridpro version ?
screenshot
Kind regards,
Raphaƫl
Make sure you have hashCode and equals properly implemented in your data bean; see https://vaadin.com/docs/latest/binding-data/data-provider/#data-binding.data-provider.item-identifiers . If you don't have them, the selection might not show up correctly.
Is it possible to set a placeholder text for a Swift Picker? I've been trying to search for a helpful answer but I haven't been successful so far, so hopefully this will help in solving the issue :)
Currently when passing available list values to the Picker I also pass it a default value to start of with. However, this default value is treated the same as if the user picked it. What I'm trying to achieve is that the default value should be grayed out (like regular placeholders for standard textfields) and when the user opens the picker that value would 'dissapear' as default forcing the user to pick something from the list (but without losing the range) - so f.ex. if I have a picker for values between 1-200 and I set my placeholder to 100 the picker would Still show this value when you open it (to avoid scrolling from the beginning) but it wouldn't be directly taken as the target value unless the user actually selects it.
A Menu may be a better option than a Picker in this instance.
Menu("Label") {
Button("Menu Item", action: menuAction)
Button("Other Menu Item", action: otherMenuAction)
}
Menu Documentation
I've got a number of buttons in a view and have assigned a tag number to each for identification in code. I just went back to check one of them, and can't find the field in the Attributes Inspector where I originally assigned the tags. I've tried all my buttons and restarted Xcode, and the result is the same--no tag field.
Here's what my attribute inspector looks like with a (tagged) button selected in the storyboard:
I came upon a recent comment by someone who also couldn't locate the tag field. He also is using Xcode 5.0.2.
Anybody else run into this?
Thanks!
The sections in the attributes inspector can be shown or hidden by clicking on the lines where the words "View", "Control", etc appear. When you rollover the line with these section titles, you'll see the words "show" or "hide" appear on the right edge of the line. Clicking anywhere on the line toggles between the two states.
Where it says view: Move your mouse over to the far right and something should appear that says "Show". Click on it and you'll see the tag identifiers, etc.
My question is very simple but I really didn't find any solution here.
I have a Table setSelectable(true), setMultiselect(false), setImmediate(true).
It works fine by first click and moving through the table using arrows.
But if I click again to the row already having been selected,
then it becomes unselected. How to prevent it?
I'd like to have kept just one row always selected.
As from the Vaadin Book here:
If the user clicks on an already selected item, the selection will deselected and the table property will have null value. You can disable this behaviour by setting setNullSelectionAllowed(false) for the table.
So:
table.setNullSelectionAllowed(false);
I created a custom icon, when I assign it to a hard-coded list the custom icon shows. but when I place it to a programmatically added list in a table it doesn't show but instead displays the "plus" icon.
ironically when I try the "delete" built-in icon it properly shows but my custom made icon wont.
these are the scenario:
this is my custom button
$(".ui-icon-customicon").css({'background-image':'url("http://website/mycustomeicon.jpg")','backgroundRepeat':'no-repeat', 'height':'18px', 'width':'18px', 'background-position':'center', 'background-color':'white'});
when I use the above button to a hard-coded list in a Table it properly shows. But when I use it like this...
listItem = document.createElement('li');
listItem.setAttribute("data-icon","customicon");
my icon doesnt show. and instead it displays the "plus" icon. but when I try this....
listItem = document.createElement('li');
listItem.setAttribute("data-icon","delete");
the button changes to the delete (builtin-icon) icon.
Anyone can help me whats the problem? please???
Update
Updating lists
If you add items to a listview, you'll need to call the
refresh() method on it to update the styles and create any nested
lists that are added. For example,
$('ul').listview('refresh');
Custom Icons
To use custom icons, specify a data-icon value that has a unique name
like myapp-email and the button plugin will generate a class by
prefixing ui-icon- to the data-icon value and apply it to the button.
You can then write a CSS rule that targets the ui-icon-myapp-email
class to specify the icon background source. To maintain visual
consistency, create a white icon 18x18 pixels saved as a PNG-8 with
alpha transparency.
Docs:
http://jquerymobile.com/test/docs/buttons/buttons-icons.html