Project: Eclipse_Platform_UI
Bug 8525 Dialog page resizing
Reported: 2002-01-25 19:28:22 | Status: closed fixed

I encountered the following problem which I think might be common to other people: I have a wizard page (dialog page) that displays fine in english but for NL platforms (ex. German, French, Italian) the description of the page doesn't fit anymore, it allows only 2 lines of text, so the page has to be resized somehow according to the length of the description. I write you the strings used in the description, maybe they might guide you somehow: "No database or schema selected. Select a database or schema and try again.", "Es wurde keine Datenbank bzw. kein Schema ausgewhlt. Whlen Sie eine Datenbank oder ein Schema aus, und wiederholen Sie die Anforderung.", "Aucune schma ou base de donnes slectionn. Slectionnez une base de donnes ou un schma et tentez ... nouveau l'opration.", sorry for the special chars that are corrupted... This is the code we are using to generate the content of the client area: public void createControl(Composite parent) { // top level group Composite composite = new Composite(parent,SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData( GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); fbg = new FolderBrowseGroup(composite, this, ""); fbg.getFolderNameField().addListener(SWT.Modify, this); createDatabaseSchemaGroup(composite); setPageComplete(determinePageCompletion()); setControl(composite); // should be on top level composite/group } private void createDatabaseSchemaGroup(Composite parent) { Composite dbSchGroup = new Composite(parent,SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; dbSchGroup.setLayout(layout); dbSchGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // database/schema selection new Label(dbSchGroup,SWT.NONE).setText("Target")); targetField = new Text(dbSchGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); targetField.setLayoutData(data); targetField.setEditable(false); targetBrowseButton = new Button(dbSchGroup, SWT.PUSH); targetBrowseButton.setText(RSCPlugin.getString("Browse...")); targetBrowseButton.addListener(SWT.Selection, this); } Actually the problem can be reproduced in a very simple scenario, create a wizard page that has, let's say, only a text box in the client area and set the description to a string sufficiently long. The wizard will resize according to the text boxes layout but it won't take into account the size of the description string, if this is long enough it will need more than 2 lines which are allocated for it. The user of the WizardPage class can control only the size of the client area, but he cannot figure out how much space the description will take because he doesn't have access to the font that is used to display the description etc. so it's really a matter of guessing. Thank you. Alexandru Nan

Files changed in fix:
bundles/org.eclipse.ui/Eclipse JFace/org/eclipse/jface/dialogs/TitleAreaDialog.java