PDA

View Full Version : getTabs() in non tabbed dialog



erfaan
24 Apr 2007, 9:36 PM
Hi
I am trying make a check if a dialog is tabbed or not. I am using this code to make the check


if(dialog.getTabs().getCount() > 0)

When I run this line of code I get a horizontal line in the center of my dialog and the whole structure of the dialog gets corrupted.

Please help me.
Thanks

tryanDLS
25 Apr 2007, 8:46 AM
Calling getTabs creates a TabPanel if it doesn't exist. The correct way to check that condition if you don't intend to build tabs is


if (dialog.tabs) {
..do something with tabs
}

erfaan
25 Apr 2007, 8:45 PM
Thanks, your help is really appreciated.