i need to add in list components that are not equal in height, is there a way for it to work?
Different cell heights within a list are not supported by LWUIT. The list takes care and resizes all cells to the size of the largest one.
Thought about different renderers (e.g. fisheye renderer link) for different components if you need to alter , even thought the cell height stays the same for the whole list.
Use the ContainerList class which is a part of LWUIT 1.5 and Codename One.
You can use your component which extends from container and add those components in a Container which has BoxLayout.Y axis as its layout so that all the list items will have height according to the text that you added. How many items do you want to add?
Related
I'm trying to add a couple of columns of check boxes to the left of the tree part of a QTreeView. As far as I can tell, using just the QTreeView all of the columns must be to the right of the tree controls.
I would probably consider using two widgets but synchronization and the trick that the check box for non-leaf nodes needs to reflect the mixed state of the children (the details of which are outside of the scope of this question) seem to aggravate the problem - it seems that the state of the two widgets would need to be tightly coupled in order for the left widget (possibly a list of check boxes) to display the correct check boxes based on the visible nodes in the right widget (the tree).
What are some of the better ways to accomplish this?
Here is an example of what I'm trying to do:
Looks like QTreeView::setTreePosition() does the trick.
I have a XamGrid that I've got displaying several dynamically generated columns, and one of those columns can have a listbox in it that sizes itself according to how many items are in it (but has a maximum height constraint). I want each row of the XamGrid to basically only be as large as it needs to be - which they are at first, but after scrolling up and down the contents of the grid a bit I find that rows that had hardly any values in the listbox (so should be fairly small in height) are now the same height as the largest rows I've scrolled into view previously. The result is a lot of wasted space, so I'm wondering if anyone knows of a way to make it so that the rows don't automatically resize themselves to match the largest row that has been loaded. I've tried taking a look at the control template but all I see in it are 3 parts and can't see any way to edit or look inside those parts.
PS I would have posted this on Infragistics own support forums but I can't for the life of me actually find any way to post new topics on there even when signed in with my IG account... great design.
Thanks
Chris
Set the RowHeight property to Dynamic. That should take care of the issue for you.
<ig:XamGrid RowHeight="Dynamic" ... >
I have a spark List with horizontal layout and custom ItemRenderer.
Each ItemRenderer has a width=80px. But it may contain graphic objects (s:Rect for example) with more than 80px width.
After compiling it looks like "overflow:hidden". But i need something like "overflow:visible" for my renderers and to see full size of my rectangles and other objects.
How to prevent the cutting of overflowed width and to display whole objects with overlapping?
Set clipAndEnableScrolling=false on the itemRenderer.
You can also just use a DataGroup, which allows you to use any layout you please.
I am newbie with Flex 4 (and Flex/AS in general).
I am using a spark list control to display certain items with my custom Item Renderer.
I am trying to achieve the following:
(1) show a separating line between rows in my list control
(2) even when not a single row has been added, I want a horizontal grid lines to be displayed in the background
I am not sure whether (1) and (2) can be achieved in one go.
I can solve (1) by modifying my item renderer to have a border, I guess. But I want to know whether there is a better or more conventional way.
I am not sure how to address (2).
Thanks!
I would do it like you said , drawing a line at the bottom of the item renderer.
As for (2), you could add a line directly on a custom list skin and remove it when the dataprovider is set
In my MFC program,I want to display different size images in a list!
I use CListCtrl and CImageList!
But the CImageList only can load fixed images!
Variable row heights in CListCtrl is not supported. You could take a look at this article that describes a control based on CWnd that handles drawing of variable row heights.
I would consider to use the so called "owner drawn" mode to draw these myself. I don't know about another option (there is no built-in mode)... Maybe you can also take the biggest size and fit the smaller images into the bigger frames but I think it will be the same effort and be less efficient...
I mean use the
CListCtrl::DrawItem()
method
Create a "grid," a non-symmetrical grid most likely, on a dialog or Form. Then populate it with irregular shaped images as you choose. If you need more space look into a Scrollable “whatever,” view, dialog, etc.
Irregular or non rectangular shaped bitmaps seems a good place to start.