How to show the iOS lookup modal in Flutter for selected text? - flutter

In most iOS apps, selected text has a "lookup" option. Flutter interactive selection only shows "cut, copy and paste". I couldn't find an option for "lookup".
Is there a way to show the "lookup" option?
If not, assuming I create my own selection controls, is there a way to manually show the modal?
For reference, here's what I mean by "lookup" option:
and here's what I mean by the "lookup" modal:

You cann't. Flutter overrides all the UI of the native system, drawing its own. Think in Flutter in the same way you think in a videogame. Flutter takes an OpenGL Canvas and draws all stuff by itself from scratch.
As you don't use any elements from native, you neither don't have the native contextual menus. That is why you get that different options.
Now, the kind of good news. You can modify the Flutter one to configure the options. You need to use the SelectableText widget from Flutter. Take a look also at the selectionControls property. You can create your own toolbar from there.

Related

Flutter, preview of app and design plugin?

Why flutter does not contain a preview of the app while we are programming it?
Is there any design plugin to be able to drag and drop widgets like in android studio for android apps?
It is difficult to build an interface from code without having a preview of the application.
Thanks!!
Disclaimer: This is not a first party tool.
I think what you're looking for is this:
https://flutterstudio.app/
It's a drag and drop editor for building Flutter layouts.
My personal recommendation is to use an emulator and learn how all the layout widgets work. Thanks to hot-reload it's super easy to experiment and create what you're looking for.
Well, you have emulator. What else do you want to preview your app?
Also on dart dev tools, you have a render tree and widget inspector. There is an option called show debug paint that I highly use to see the size and boundaries of widgets, and many other options I didn't discover yet.
You can use flutter studio if you want to create your ui by dragging and dropping widgets but I didn't use it.
And I just found that.
I really didn't understand what you mean by previewing.
For example, when you are starting and have a lot of examples, you might not remember what they look like.
I might suggest that you save a screenshot in your assets, so you can then remember what the app is about, without running the code.

How can I add a custom column menu tab in ag-grid?

Is there a way to add a custom column menu tab with my own favourite icon which on click would render my custom react component?
something like
myColDef.menuTabs: ['generalMenuTab', 'filterMenuTab', 'myCustomMenuTab']
FYI I'm using v12.0.2
What you're after can't be done I'm afraid. The grid supports React components in all sorts of ways (renderers, editors, filters etc), but not via the column menu.
I've updated the docs page to remove the gibberish issue - it'll be fixed properly in the next release, thanks for highlighting this.
This would be helpful to have. In particular for us, we'd like to filter based off row properties, and not row values. Creating our own tab to filter by cell colors that we have assigned with our own set of labels would be useful.
I agree that it would be a nice feature to have. Apparently, there's no quick out-of-the-box solution to do it. The only workaround I see is to implement your own custom Header component which would display any buttons your want.
There you can put a button to open your own custom menu, which you can implement as any regular UI component. It also means you'll need to manually implement all standard menu options that Ag-Grid provides out of the box if you need them.

Xcode design data

Can I add to my interface builder design data that appears only in design mode?
For example - add text to labels, items to a list view, pictures inside imageviews, etc., all in design mode while using Xcode. However, in runtime, none of it will appear.
If you are coming from the Android world, I'm looking for the equivalent of the "tools" xml attribute.
There is no Hidden during runtime option AFAIK. But you can use Hidden under Attribute inspector->View->Drawing to manually hide each UI elements.

A gwt dropdown ListBox that can have values manually type in?

Our GWT based application needs a font size selector. Ussually people will want to pick the font size from a set of standard sizes. Sometimes however users will want to manually type in a specific font size like '12.6'. We obviously cannot put ever tenth of a point option inside our font size dropdown so a dropdown that can have any value entered manually would make the most sense.
I was told simple-gwt has a widget called ComboBox but it appears to be meant for an older version of gwt (we are on the latest - 2.4). Suggestbox would work except there is no "dropdown" arrow to popup the suggestions so users who do not want to type the size cannot use it.
Any suggestions? I was surprised this widget was not built into GWT.
The widget to use is the SuggestBox - you may or may not be able to extend it to use a click handler to show a set of default suggestions (there may be a property to allow it) and to use CSS to show a dropdown arrow.
javadoc here: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/SuggestBox.html
Example here: http://examples.roughian.com/index.htm#Widgets~SuggestBox
I know that Smart GWT and ext-gwt have widgets that provide this kind of functionality, but neither of those libraries are free.
Of course you could always roll your own.
I found this library "Advanced GWT components". It is a free library that has drop in GWT widgets.

how to display drop-down in iphone, like in this image

hi
I want to display drop down menu like the one you see in this image http://callingcard.marigoholdings.com/Screenshots.html#1
(below From and To)
How can i create that? Any good tutorial.
Best regards
You will have to use UIPicker for this purpose.This is used as a dropdown whereever needed in iPhone.
Please refer the link below
How to create drop down list box for an iphone app
Thanks
It looks like that app is using a combination of a UIWebView and an html select tag. To do something similar would involve a solid bit of html and javascript hackery, but in essence would be:
Create a UIWebView and inject the appropriate HTML into it to make the dropdown.
User uses dropdown as if it was in mobile safari and picks something.
When you need it, you use a javascript call with stringByEvaluatingJavaScriptFromString: to grab the value of the dropdown by id and pass it back to your code.
There are a few gotchas here, mainly with constructing the dropdown and the webview such that it's big enough to show the expanded dropdown but transparent to see under it when the dropdown is not expanded, it's not scrollable, and that sort of thing.
I wonder if a UIActionsheet might be better ... you could easy make a button to call the sheet. Adding multiple buttons to the sheet transforms it into a table that you can scroll.