I have an overlay that has a toolbar as a dockedItem and a Ext.List as an item.
This overlay is shown as the user drags the slider to show the important things in each card I have in a carousel. Each card has its own store with data I want to show in the overlay.
I am able to change the toolbar's title while I drag:
this.overlayTb.setTitle(cards[index].categoryName);
but when I try to change the store that feeds my list view, it does work.
this.myList.store = cards[index].store;
It just keeps showing the data of the initial store I set up instead of changing, like the toolbar title does.
I have tried calling doLayout() on myList and Ext.StoreMgr.get('newsStore').load(); as suggested in this answer, but no good came out of that. And if I try:
this.myList.update();
it stops showing the data of the store, and I can only see a blank panel
While debugging, I can see that this.myList.store changes to the store I need, but the view is not updating.
I hope you can help me
Use the bindStore(cards[index].store) method of the Ext.List which properly destroys and cleans up after the old store and binds the new store to the List's events.
Related
In my tableview controller. The images are being added as backgrounds to the button. These buttons are then added to the table view cell on user requirement.
If i show/hide the cell. The buttons with background images from the hidden cell are being shown on the enabled row/cell i.e. overlapping. I have read articles regarding prepareforReuse function. Which can be used if i know the existing properties. In my app the buttons are being added based on user selection.
Is there any way to use prepareforReuse to reset every thing even the buttons which have been added programmatically so that when they are called then overlapping issue doesnt appear.
Main Problem: I cannot give names of my buttons to set their values as nil because i dont know how many will be created. While in prepareforReuse (to reset the cell) i need to provide some property names which exist in cells already.
Is it possible to save the current tab position/order in a QTabWidget in Qt?
What I want is basically to be able to let the users arrange the tabs as they like and then let them save the position so when they open the application again the tabs are where they were when last saved.
In the past I have done this put this only saves the window geometry.
QSettings mySettings("someName", "MyApp");
mySettings.beginGroup("MainWindow");
mySettings.setValue("geometry", saveGeometry());
mySettings.endGroup()
;
Any idea how or where can I find the information to get this done?
Thanks
Apparently there is no built-in way to do it, so you need to implement it. I don't see any possible troubles with it.
For example, you may obtain the index of each widget using QTabWidget::indexOf, or you may iterate over all tabs and obtain widgets using QTabWidget::widget, depending on which way is more convenient in your app.
When starting the app, sort your widgets by saved index and add them to the tab widget in that order.
I'm working on a events board app. Events are displayed in columns at the height matching the start time and pack into the space if there is more then one overlapping. Each event is a view and I want to have a div next to the view that shows and hides on hover.
I know how to bind to mouseEnter and mouseLeave to show and hide part of the template but I want to show something adjacent to my view/template not within it.
I've already got some computed properties on the view to place the event with the correct height and width so I don't want to add the popover inside the view.
Here is something to mess with http://jsbin.com/osoner/1/edit
Seems like something simple but I want to make sure I'm doing things the Ember way.
After messing a little with your provided jsbin, here the results.
Basically what I've done was adding a new popup css declaration wich do position the popup so that it appears outside the parent view, and also moved the {{#if...}} helper into the originating view.
If you want to go more fancy, checkout this jsfiddle wich uses the twitter boostrap popover.
Hope it helps.
I have a list, I want to open a View/Panel when "itemtap" event is fired (i.e. when a list item is selected). How to do it? Shall I use NestedList and getDetailCard() for it?
Thanks
EDIT : I think I should use CardLayout for it.
It depends on your situation.
If the new content you are trying to display is supposed to be replacing content on the screen, that yes using the CardLayout is the best option. This would be akin to emulating something like the UISplitViewController in the iOS world, where you have a list on the left and a main view on the right in which additional content is slid onto the screen based on actions to the right list.
So, on response to 'itemtap' events in the list you would do a 'setActiveItem' call to the panel that has a layout of card layout, and a series of children panels. You could also lazily create the panels in response to the list actions and add them on the event.
Is it possible to make the checkboxes in a list view control with LVS_EX_CHECKBOXES style tri-state (having BS_3STATE button style)? I'm using WTL but I'm OK manually sending messages around.
Yes, you need an ImageList with 3 images of a unchecked, checked and indeterminate checkbox. Call ListView_SetImageList() to assign the LVSIL_STATE image list. Manipulate LVITEM.state to display the kind of checkbox you want.