Latest Vaadin Flow 23.0.10. According to method setDropLabelIcon documentation:
Set the component to show as the drop label icon. The icon is visible when the user can drop files to this upload component. Despite of the name, the drop label icon can be any component.
Params:
dropLabelIcon – the label icon to show for the users when it's possible to drop files, or null to cleat it
calling method setDropLabelIcon(null) not clear default icon.
It is bug or feature?
Thanks
Related
In a Vaadin 14 application I wanted to exchange this standard icon at a combobox:
for another icon (and achieved the goal, but I think that my way is not the best / nicest).
My full use case is assembling a list, some buttons and a combobox to create this sortable multi-select-list:
The user can add a new value to the list by selecting the new value in the combobox below.
To exchange the standard icon for the combobox (--lumo-icons-dropdown = \ea18, an arrow showing down) for a plus-icon, I used this code: combobox.getElement().getStyle().set("--lumo-icons-dropdown", "\"\\ea23\""); (yes, all the quotes and backslashes are as shown)
This works fine (as you can see in the screenshot), but it feels incorrect to overwrite an icon.
Is there another (better) way to exchange the standard dropdown icon at a Vaadin combobox for another icon?
I'm trying to change the color used when elements of the MetropolisUIBlack.Style XE5 style (Firemonkey). It seems that, in order to do so, the simplest way would be to edit the PNG image that contains all these elements i the style (MetroBluestyle.png).
Unfortunately, I can't find a way to save the PNG that is contained in the style element to a file so I can manipulate it safely and reload it once the color has been changed.
Use the Bitmap Style Designer provided with the product.
You can find it in the Tools menù and, once started, you simply have to open the MetropolisUIBlack.vsf file, select the "style.png" item under Images and click the Export button (above the right panel where you can see a preview of the picture).
Edit the picture with your favorite editor (i.e. The Gimp), save the picture, and load it back in the style using the Update button (just left the Export one).
You can save your style with a different name and use it as usual.
HTH
When I open a folder with an OpenDialog, how can I filter it so users can view only certain files (e.g., Stringgrid, *.sg) and the files with any other extension do not appear in the dialog window?
Set the OpenDialog.Filter property to the file filter you want.
You can do this in the Object Inspector:
Click in the Filter property, and you'll see a small button appear on the right edge with ....
Click that, and you'll see a dialog appear.
On the left side is the description of the file (for instance, Excel files (*.xls)). The right side is the filter you want to use, as in *.xls.
You can also set it in code before displaying your dialog:
OpenDialog1.Filter := 'Excel files (*.xls)|*.xls';
Of course, replace the Excel stuff with any description and mask you want to use.
The Filter and FilterIndex properties are used to specify which file extension(s) to display (note that the user can override the filter manually, though).
The OnIncludeItem event is used to selectively allow/disallow individual files/folders from being listed in the dialog.
I have used ToolStripButton which is added in ToolStrip. I have set icon on the buttons and by default button is disabled. problem is icon only shown on button when it is enabled. and but I want to show icon in disabled form of button too.
When a ToolStripButton becomes disabled, the URL of the icon gets "_disabled" added to it. So you'll see a 404 in the Net tab of Firebug from the attempt to fetch that icon. Just put the image file for the disabled version of your icon at that URL.
One small clarification. In my case smarGWT is looking for icon with "_Disabled" appended (with first letter in uppercase). Hope this will save someone time :)
We would like to be able to customize the areas outside the form elements area itself, such that customers can have all their forms including the areas surrounding the form in their own style. For instance in the area on the top we would like to have a different color and we would like to replace the Orbeon logo by the logo of the customer. Also we would like to hide/remove/customize some buttons that appear below the form. For instance we don't need the buttons for PDF, Email and Close and we want to change the text in the Save button to Submit.
Is that possible? If so, how do we do that? Is there some instruction somewhere for this?
Yes, you can do all of this through properties:
You can change the color at the top by overriding the .fr-top rule defined in form-runner-orbeon.css. For more on how to override CSS, see: Default CSS.
You can replace or remove the default logo with the oxf.fr.default-logo.uri.*.* property. See Default logo.
You can choose which buttons are shown on the Form Runner "details" page by overriding the oxf.fr.detail.buttons.*.* property. See Buttons on the detail page.
You can change the label on a button by overriding resources. See Overriding resources.
I was faced with the problem to change the icon in the browser address and found the answer of Alessandro Vernet:
http://discuss.orbeon.com/page-address-bar-browser-icon-td4660752.html .
But this solution has the drawback that I had to change the orbeon-form-runner.jar, and this with every new orbeon forms release, what I wanted to avoid.
So the idea was to give my icons the same name as the orbeon icons and to load them in a corresponding directory of the resource directory.
So I named my icon orbeon-icon-16.ico and orbeon-icon-16.png and loaded the two files in orbeon/WEB-INF/resources/ops/images.
For Firefox this was OK, but IE continued to show the orbeon icon. Then I noticed that in orbeon-core.jar there where also the 32 pixel icon.
So I added the two files orbeon-icon-32.ico and orbeon-icon-32.png and than also IE was showing our icon.