I am working a navigation based application. In my application user can search using the UISearchBar. Now I want the keyboard to be dismissed after the user hits search (or done not sure which one it is). I tried doing the way it is done for UITextField but didn't work. so any help would be appreciated.
thanks,
Hope this helps for anyone that else was looking for this.
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
[sbSearch resignFirstResponder];
}
Using UISearchBarDelegate.
Related
I open a webresource (HTML) when an opportunity is closed as won.
This is triggered only by clicking on the button in the opportunity form.
I use the following code to achieve the same:
function FrmOnSave(prmContext) {
var lclSaveMode;
if (prmContext != null && prmContext.getEventArgs() != null) {
lclSaveMode = prmContext.getEventArgs().getSaveMode();
if(lclSaveMode==5)
{
window.openStdWin(url,"myWindow");
}
However this does not get triggered when the opportunity is closed from the "Open Opportunity" view. Is there a way to achieve the same? Thank you all!
The best thing to do here, would be to hide the existing close button, add a new button which looks the same and does all the same things but also opens that window.
You can debug using IE (F12) to see which javascript function is being called on your case, or what is actually happening.
#James Wood answer is a good advice though, it is the safest way to achieve what you want.
I want to hide the restricted category instead of red and not clickable option.
I think there is no GUI option in Liferay 5.2.3 to hide restricted category. Can anyone suggest me what I can change in the code to achieve this?
I found one solution by some hit and trail with the help of this link http://issues.liferay.com/browse/LPS-8344.
Go to tomcat-6.0.18\webapps\ROOT\html\portlet\message_boards\view.jsp
and change following lines
if (restricted) {
row.addText(StringPool.BLANK);
}
to
if (restricted) {
continue;
}
I hope if someone has better solution then this will post here. :)
I had used the normal form in my project.
In that form i had used the item
1)textfield
2)ChoiceGroup
I want to set focus on choice group when the from appears.How do i get this.
Please help me.
You can try
Display.getDisplay(this).setCurrentItem(choiceGroup);
I am coding an Excel add in and would like my ribbon buttons to be disabled when the user is clicked into (editing) a cell. I see this happen with other ribbon buttons in Excel and in the TFS Excel add in so I'm hoping there's some way that other developers can accomplish it. Is there some way to determine/handle when an edit begins/ends (i.e. via double clicking/hitting Enter/hitting Escape)?
I was thinking I could manually enable/disable the buttons during these events. I was wondering if the technique described here http://www.codeproject.com/KB/office/Excel_Edit_Mode.aspx is the best way to detect if a cell is currently being edited?
Any guidance would be greatly appreciated.
Thanks
Sorry for the late answer. I just came across your question.
I wanted the same behavior in my project and I succesfuly integrated this solution:
http://www.codeproject.com/KB/office/ExcelInEditMode.aspx
It was painless and worked very well. I just added the class in my project, created an instance of it and attached events to the EditModeOff and EditModeOn events.
Hope that helps (you or someone else)
Here is what I have done to accomplish the same goal as you.
I created a Timer set for 500ms
In the event handler for the Timer, I perform the following check
if (Globals.ThisAddIn.Application.Ready)
{
SetRibbonState()
}
Where SetRibbonState is something like this:
private void SetRibbonState()
{
if (IsEditing())
{
buttonRefresh.Enabled = false;
}
else
{
buttonRefresh.Enabled = true;
}
}
public static bool IsEditing()
{
return !Globals.ThisAddIn.Application.CommandBars.GetEnabledMso(FileNewDefaultIdMso);
}
I have ActiveX control developed using VC++. When user clicks on my control, i dont want to handle it and want to pass it to controls below it. (This will be useful if my control is on top of other controls)
To achieve it, i have implemented OnQueryHitPoint() on my control. This works fine when my control is used in VB. But OnQueryHitPoint() is NOT called at all when my control used in VC++.
I appreciate any ideas.
Thanks.
I solved it by myself. I need to override OnNcHitTest() and return HTTRANSPARENT. Hope it will help someone.
Thanks.