I have a message dialog as follows:
import org.eclipse.jface.dialogs.MessageDialog
public void openQuestion(Shell parentShell, String title, String question, final int iconStyle){
MessageDialog dialog = new MessageDialog(
parentShell,
title,
getTitleIcon(iconStyle),
question,
iconStyle,
new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL },
0
) {
@Override
public Image getImage() {
return getIcon(iconStyle);
}
};
return dialog.open() == IDialogConstants.OK_ID;
}
Here when I pass question(parameter) as a small string, I'm able to see OK, Cancel buttons in the dialog. But on the other hand, when I pass question(parameter) as a large string in the message dialog, OK and Cancel buttons are not visible in the dialog. They get hidden. Is there any way that the OK and Cancel buttons be displayed always??