Magento - hide the buttons "Reset Filter" and "Search" - magento

how can I hide the buttons "Reset Filter" and "Search" in a custom module grid ?
Thanks.

Hide filter buttons only
To only hide "Reset filter" and "Search" buttons, but keep the header filter fields, you could override Mage_Adminhtml_Block_Widget_Grid::getMainButtonsHtml() with:
public function getMainButtonsHtml()
{
return '';
}
Hide filter buttons and header filter fields
If you want to hide the whole filter stuff, "Reset filter", "Search" button and the header filter fields, you could use the setFilterVisibility() method of Mage_Adminhtml_Block_Widget_Grid:
$this->setFilterVisibility(false);

You can control individual buttons with:
protected function _prepareLayout()
{
$this->unsetChild('reset_filter_button');
$this->unsetChild('search_button');
}
There is also an export_button child too.

Related

On NSSavePanel, is there a way to force the “Hide extension” checkbox to show?

I have overridden NSDocument’s prepareSavePanel(_:) method to attempt to add a checkbox to allow the user to hide the filename extension when saving.
override func prepareSavePanel(_ savePanel: NSSavePanel) -> Bool {
savePanel.canSelectHiddenExtension = true
savePanel.isExtensionHidden = false
return true
}
But the checkbox still won’t show on the Save panel.
"Hide Extension" is now in the pull-down menu.

Drag selecting in NSCollectionView from inside of items

I have a series of items that I am showing them in a NSCollectionView. The selection and multiple selection are both enabled.
The user can select items by dragging (i.e. marking items by drag). however this works when the user start dragging from collection view background or the space between items (and not on the items) but I want make it possible when dragging starts on the items too.
I want something like this photo if we consider text and image as a single item.
image source: http://osxdaily.com/2013/09/16/select-multiple-files-mac-os-x/
Thank you in advance.
Implement hitTest(_:) in the class of the item view to make the items "see through" for clicks. Return the collection view instead of the item view when the user clicks in the item view.
override func hitTest(_ point: NSPoint) -> NSView? {
var view = super.hitTest(point)
if view == self {
repeat {
view = view!.superview
} while view != nil && !(view is NSCollectionView)
}
return view;
}

Can we override NAVIGATION BACK BUTTON press in Xamarin.forms?

Can we override navigation back button pressed in Xamarin.forms?
I have one navigation back button and the one save button in navigation bar.Save button hits the web service and saves in asynchronous way. While saving although i used progressing bar, navigation back button can be pressed and hence the app crashes due to index out of range exception on navigation stack.I tried using OnDisappearing() , did not work. I wanna cancel the PopUpAsync(),if the save is not done completely, but failed to achieve that. Is there any solution for this scenario? Can we override the navigation back button press event using any custom renderer ?
For controlling the back button to do what I want, I used this method in Xamarin:
public override bool OnKeyDown(Keycode HWkeyCode, KeyEvent e)
{
if (HWkeyCode == Keycode.Back)
{
StartActivity(typeof(FrontPageActivity));
return true;
}
return false;
}

How do I show a Next button on Sencha NavigationView?

Sencha adds a nice Back button to the navigation bar. As shown below.
So my questions are:-
How can I dynamically add the Next button to the navigation bar?
How do I style the Next button to have a triangular edge, similar to what the Back button has?
You can change appearance of button to look alike forward button by setting ui : "forward" config for button.
You can add buttons to navigation bar with following way -
navigationBar : {
items:[
{
xtype:'button',
text:'Forward',
ui:'forward'
}
]
},
You can also add buttons dynamically to navigation bar from controller. First get instance of navigation view and then navigation bar. Create some buttons and add them to it.
var navBar = this.getMyNavView().getNavigationBar();
var button = Ext.create('Ext.Button', {
text: 'Button'
});
navBar.add(button);
update
Found this issue for ui : 'forward' on sencha forum. Have a look at it.
http://www.sencha.com/forum/showthread.php?253899-When-using-ui-forward-and-back-the-buttons-are-not-being-rendered-properly

Display options menu using onClickListener

I was just wondering whether it is possible to display my options menu to be displayed when I click on a image. Now I have displayed my options menu when the menu button is clicked. But I would like to display it when the user clicks on my imageView too. Is this possible?
I found this to be so simple at last.
imageView.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
openOptionsMenu();
}
});

Resources