I am using spark's combobox as Itemeditor in advance datagrid.
It is working properly but fails to open properly when the Combobox is opened near the bottom of the Flex Object.
It tends to open upwards for the first time (which is perfectly fine) but when I type alphabets to search, it filteres the records and adjust the height of the list properly but could not make to manage the Y cordinate so as to keep the list adjacent to its textbox.
Attaching the two snap shot. Please suggest any solution to fix this.
Thanks
Related
I have a group box or the like containing a combobox and some more widgets that shall not all be visible at the same time. Depending on the selection I want at the same place to be displayed a button or a line edit or a (second) combobox. So if combobox entry one is selected it shows the button, if entry two is selected it shows the line edit, if entry three is selected it shows the second combobox, while not showing the other two.
I know that I can do it all dynamically but this results in a lot of code lines. I want to use QT Designer and a grid layout and I can't see how to put two widgets at the same place and then make only one visible programmatically.
I hope I could explain properly.
I played with Qt Designer but could not place two widgets over one another in a grid layout.
Thanks for any help.
Thank you G.M.
Yes, I was looking for QStackedWidget. I wasn't aware of this at all. I tried it and it works easily out of the box.
As you can see,I can click the first check box(PRODUCT-323),but can't click the second.After a long
trying,I find it is because the second doesn't get scrolled to view(Is it intented by tool design or a bug?).So how to scroll this popup div to ensure the second get shown?
Actually,I have tried this,but failed
((JavascriptExecutor)driver).executeScript("document.getElementById("pupop").scrollTo(0,30)");
Can you please share which version of WebDriver are you using?
If I remember correctly, Version 2.16 or so had a known issue with locators not scrolling into view. The reason being,, they were using the position co-ordinates of the center of the element to bring focus and in this case, the center is hidden from view. This was solved in later versions.
There are a couple of approaches.
1) Try to perform some action on an Element that is completely hidden from view.This will bring the element fully into view and you will be able to access it.
In this case, try to access the checkbox in 3rd or the 4th row, you will be able to bring focus there. Then access the 2nd row.
2) Do a Driver.Manage().Window.Maximize() [This is in c#]. This will also bring the element into view.
It is a good practice to avoid a window with both scroll-bars. By maximizing it you will reduce the window for such errors.
Hope this is useful.
Did u try the keyboard options?? ctrl+ down arrow through script???
Or in the worst case use tab to focus on to that checkbox.. I works in OpenScript and RFT this way.
1) To click the second checkbox: You can use the xpath to find that element. In xpath you can easily get the table row id for each checkbox which will gets incremented in their ID.
2) To scroll you can use the below code:
JavascriptExecutor js = (JavascriptExecutor) webdriver;
js.executeScript("scroll(0,0);");
When I use treetable in Vaadin, it is working fine drag and drop the whole row when click the left and right blank ereas. but that is not user friendly, I wanna create a draggable layout inside the row, let's say the 1st component of the each row, that when clicking it, the whole row is selected and can be draged and dropped to reorder.
The thing is I can create a vertical layout with wrapper doing that, but drag mode is only for its component or the wrapper itself, and when doing the drag action, it doesn't actually showing the whole row is moving, which may confuse the clients. What can I do to make it looking like I am dragging the whole row, similar with the one you drag the blank area of each row? Thanks.
I'm afraid there currently is no way for adding a wrapper that would extend the entire row instead of just one cell. To do this you'd need to extend the client-side implementation of Table (VScrollTable) and this is not something I would recommend as it is quite complex.
I do think that what you describe should be possible in core Vaadin (without using drag & drop wrappers), so could you please file a ticket at dev.vaadin.com? And please attach a small application showing the problem to make it easier for us to see the problem and fix it.
Anyways, in order for you to get it working today I'd suggest that you change your UI design a bit and for example borrow drag handles from iOS. By this I mean that you could add an icon that suggests "draggable" as a background-image in the first cell (or in the row header cell of each row) that encourages the user to grab the row there, where it is "empty" and dragging works. This way the user might not be too confused if dragging only works reliably in some parts of the rows.
Consider an ASP.NET server control DropDownList (or <input type='select'>) with a large number of options (e.g. 100 options). When clicking on the list, the full list of 100 options are shown. They're all displayed, and run off the screen.
How can the control's picklist size be resized or limited to the first n options?
Frédéric Hamidi has already given the short answer, however he has also referred you to a perfect alternative. Explore this and that is similar to what I had done when I faced similar situation.
Idea is that you don't populate your list. This way your drop down will be empty and in place of that you show a div with scrollbar and whatever you wish. Align this div in such a way that user thinks, "it is the dropdown".
i am using a data grid in flex and i am generating data from a mysql server. However, my problem is with adding a button within the datagrid so each row has one.
i have set the columns itemRenderer to mx.controls.Button although with the buttons shown in the grid there is no label on them (even though one has been set) and the assigned click event does not trigger when hitting the button. anyone have any ideas or guidance on what i am doing wrong.
Thanks
Mark
Not to worry I have sorted it. anyone with a similar issue i suggest reading this
http://www.axelscript.com/2008/02/29/using-the-itemrenderer-with-a-datagrid-in-flex/
an excellent source.