GTK ListView With Multiple Objects? - gtk

How can I create a listview that includes other objects such as image, link, etc. in GTK? What I mean is, just like these Android ListViews:
http://www.vogella.com/articles/AndroidListView/images/listview_contextual10.png
What I want is:
http://pic002.cnblogs.com/images/2012/372551/2012021011374176.jpg
How can I do that in GTK?

The easy way is to create a custom widget that lays out the text and images how you want it, and then put that into a GtkVBox and put that GtkVBox into GtkScrolledWindow
This isn't really any easy way to do it with GtkTreeView

Related

Create Vertical List in Flutter

I want to create this type of listview using flutter.
https://dribbble.com/shots/6872462-Food-ordering-app-Animate
You can find out more by clicking on this link. But I don't know how to create this type of list. I mean, you can see in the GIF that the list is indexed based.
A fixed indexed item container is colored.
How can I achieve it?
Flutter provides you with a widget very similar to the result you want to achieve called NavigationRail.
You will not have the animation by default, but you can maybe search in the source code of this widget how to create a custom widget that will implement animations.

Now which widgets are right now shown in List

Hello I have a ListView with different Widgets of different height. Now I want to know which of those Widgets are at the moment visible in the ListView. Does anyone has an idea how to do it. I can't use to scroll_to_widget package because it interferes other implementations.
Try using https://pub.dev/packages/visibility_detector maybe you can create a separate list and store true according to index, based on their visibility?

How can i make a Row display like this without making a new class?

Im trying to make an new app, and i want to display a row like this
i dont understand the concept behind it, like how can he divide the box into two type of colors, and how can the shape of the box looks like that. anyone that can teach me i will appriciated it.
This is not exactly a simple UI layout to create if you are just starting out with Flutter.
Simply put, you have to have a Row containing copies of a widget you create yourself as a stateless widget. The widget tree would look something like this.
Row
CustomWidget
CustomWidget
...
The CustomWidget is the complex part, this is a simplified example of how the Widget tree of this widget could look. Create a stateless widget and try to create it yourself.
Card
Column
Container
Row
Icon
Text
Container
Align
Text
Note you will have to set the color property of the Card and Container widgets, and add some padding certain places in the widget tree. Plus, the last container will need a width property as well.
If you need more help - show what you have attempted with code (edit your question)
Hope this helps!

Strange issue when I using GtkScrolledWindow in glade

I want to wrap a listbox widget into a scrolled widget, then I find the GtkScrolledWindow, however, I could not drag and drop a GtkListBox into GtkScrolledWindow. I also tried right click the GtkListBox, select Add Parent then Scrolled Window like the following snapshot.
But, I could make it work by manual modify the glade ui file.
So I want to know Why and How to do it in glade.
José Fonte's answer is right, I need to wrap the content into a viewport first, then make the viewport as a child of scrolledWindow.

How to put gwt panels and widgets in CellList?

I want to put a complex layout with text-fields and operation buttons for each cell in a CellList. So I want to put a GWT panel to organize the widgets.
Is it possible to put gwt panels and widgets in CellList? I tried to extend AbstractCell and override render(). But seems only HTML can be rendered. I didn't find a way to render normal gwt panels and widgets.
CompositeCell seems going through List> automatically, you can not arrange widget as you wish. Also, I don't know whether normal widgets like PushButton can be used in CompositedCell.
Please give me a sample if you tried this before? Thanks a lot.
It is not possible to put GWT widgets or Panels in a CellWidgets.
CellWidgets are designed for rapid rendering of large amounts of data.
If you don't have that use case you can still use a FlexTable.
Otherwise you have to create a CompositeCell or AbstractCell and implement the render and event handling methods yourself.