adobe flex datagrid selectable columns - apache-flex

I'm trying to make a Flex (Advanced)DataGrid component with some mechanism where the user can toggle the visibility of the columns. I've crudely implemented this by reading in the columns into the right-click menu, and when a column name is selected here, the visibility is toggled. It works, but it's not the most elegant solution.
Specifically, I'm trying to emulate the "datagrid" that Mozilla Thunderbird uses to display emails. Here is an image:
In the upper right, there is an icon over the scroll bar. If there is no scrollbar, the icon remains in the same place. When clicking the icon, it opens up a menu that shows all the possible columns, with the visible ones having a check mark next to them, like this:
Also, the scroll bar always appears under this button, never "pushing" it over into it's own column.
I'd like to re-create this in Flex. I believe the menu part and creating a column with a button headerRenderer is easy enough. But I can't figure out how (if at all possible) to do this with the scrollbar, because the scrollbar always seems to be "its own column". Any ideas or help would be appreciated. Thank you.
Ian

One dirty solution comes to mind. Create a component based on Canvas, then add an AdvancedDataGrid by overriding createChildren. Override updateDisplayList as well and add a button like the one in Thunderbird to the upper right of the Canvas. This will cause the button to appear over the DataGrid. Problemo solved?

Related

Position Mat-Select options ONLY below trigger element

I'm working on an Angular 8 project, using Material. I've searched SO and google for solutions on how to what I want, but my search has been futile.
I also went through How to customize mat-select dropdown position? but my question is different. That question seems to be more about the position of the popover. The solutions there are about positioning the menu below or above but not over the trigger element
I guess, my question is more about the direction of the popover. I would like to only drop down and not drop up. I don't know if, I'm making enough sense here...lol
Current Behavior:
When a user opens the mat-select it pops up the options 1. Over the element (like somehow in the middle). 2. It positions the rest of the options either above or below the element, depending on the scroll position (or rather element's position on screen).
The Problem right now: When it pops up above the element, the options are getting rendered out side the screen.
Wanted Behavior:
When user clicks the mat-select, 1. it pops up options BELOW the element. 2. Despite the element position, options are ALWAYS show below. Like a dropdown, never a drop up.
Sort of like how you can choose to use a dropdown or drop up with Bootstrap
Thank you in advance for you assistance and suggestions.

Drop scroll using select in last line of the table

I made a custom dropdown. In the last line of the table, scroll is created when dropdown is open. I need to scroll to see dropdown elements. I do not want this.
I want you to open up the body of the dropdown or enlarge the body. How can I do it?
Document is already enlarged by enlarged content/element, scroll shows that. You need only scroll to view entire enlarged element, f.e.:
elmnt.scrollIntoView(false);
Real problem (using react) is that should be done after change state and rendering enlarged element.
I probably would use setTimeout called from setState callback. It's quite common way to be sure it's called after updating state/view. You'll find examples on SO.

How to temporarily hide elements while designing in Gluon Scene Builder?

I have complex design that has several layers on top of each other. Problem is that if I click on object, other object that on top of it gets selected. How I can switch off visibility of my top objects while working on my bottom layer, so that they won't get in the way?
I finally found how to achieve what I wanted. Just select element that in the way and in properties remove tick from visible. Now you can design without anything obstructing your view! Just don't forget to make visible all elements before you save your work.

GWT - PopupPanel, change layout when flipped

I'm creating a context menu for certain elements using a PopupPanel; the menu itself is going to be fairly large and complex. What I'm looking to do is to have a list of buttons, plus an image and some text, related to the element clicked.
My problem is that I'd like the buttons to always display directly under the clicked element, because that's convenient for the user; the issue is that when PopupPanel is near the edges of the screen, it automatically changes position to be fully visible, not aligning its left side to the element as usual. I like this behavior, but it moves the position of the buttons away.
So what I'd like to happen is: normally the buttons are on the left of the panel, the other stuff is to the right. When the panel is close to the right of the screen, I'd like the buttons to instead be on the right (and thus under the clicked element) and the other stuff on the left.
Is there a clever way to do this, either in GWT or better yet, using only CSS? PopupPanel itself doesn't seem to tell you when it's going to get flipped, sadly. The only solution I currently have is to manually check the position and width of the popup before showing it and adjust accordingly, but I'm hoping there's a better solution.
Here is what I suggest (based on my own implementation of a similar use case):
Have the position callback implementation accept references (in constructor) on:
PopupPanel element
element on which user right cliked
the content you put in the PopupPanel
Replicate (I know this not DRY but implementation is package private) the code from default position callback
When opening to the right invoke a method that changes the layout of your content (CSS based or otherwise)
I hope it helps. If you find something better let me know.

Zooming effect on datagrid cell with an image in the itemrenderer

I am not able to figure out how to zoom the image displayed with the help of an item renderer.If i apply the Zoom effect on rollover ,the particular cell zooms the image with the scroll bars.Is their any other way of doing this without showing the scrollbars.
You'll need to duplicate the image and place it outside of the datagrid component. If it's inside the datagrid, it'll be forced into one of the rows. It might be helpful for you to look at the code for the DataGridDragProxy - it does does something sorta similar.

Resources