rulesVLayout.addMembers(techGrid,rulesHLayout);SmartClient Version: SNAPSHOT_v11.1d_2017-01-31/PowerEdition Deployment (built 2017-01-31)
This is a reasonably simply question, so hopefully you don't need example code.
The Canvas has a single VLayout and single HLayout. The HLayout contains 3 IButtons, with 2 Layout spacers between the 3 buttons:
rulesHLayout.addMembers(applyChangeBtn, hSpcr1, addNewBtn, hSpcr2, exitBtn);
The VLayout simply contains a listgrid and the HLayout:
rulesVLayout.addMembers(techGrid,rulesHLayout);
The grid is defined with these features:
techRulesWindow.setAutoSize(true);
techRulesWindow.setLeft(100);
techRulesWindow.setTop(75);
techRulesWindow.setAnimateShowEffect(AnimationEffect.FADE);
techRulesWindow.setAnimateShowTime(900);
techGrid.setAutoFitFieldWidths(true);
techGrid.setAutoFitData(Autofit.BOTH);
techGrid.setAutoWidth();
techGrid.setHeight(600);
techGrid.setAutoFetchData(true);
When the window opens, the HLayout is drawn with a relatively small size, the buttons of the rulesHLayout get drawn and spaced over that small width - but following correctly the rule to allow enough space to draw the icons and allow for their title overflows - so it looks correct but is of a small width.
The grid then fetches it's data an re-draws to fit the data and headings to a much WIDER correctly drawn grid, with the AutoFit function drawing it correctly.
However the HLayout and its buttons do not get re-drawn to match the grid size, and its layout looks compressed against the grid. If I resize the window the HLayout then redraws and spaces the button out appropriately, one to the left, one in the middle and the last on the right.
Is there some 'automatic' way to get the HLayout to resize when the gird auto-fits, or do I have to add a fetchData Handler to the grid, and mark the window for re-draw when it is called back?
This is a reasonably simply question, so hopefully you don't need example code.
The Canvas has a single VLayout and single HLayout. The HLayout contains 3 IButtons, with 2 Layout spacers between the 3 buttons:
rulesHLayout.addMembers(applyChangeBtn, hSpcr1, addNewBtn, hSpcr2, exitBtn);
The VLayout simply contains a listgrid and the HLayout:
rulesVLayout.addMembers(techGrid,rulesHLayout);
The grid is defined with these features:
techRulesWindow.setAutoSize(true);
techRulesWindow.setLeft(100);
techRulesWindow.setTop(75);
techRulesWindow.setAnimateShowEffect(AnimationEffect.FADE);
techRulesWindow.setAnimateShowTime(900);
techGrid.setAutoFitFieldWidths(true);
techGrid.setAutoFitData(Autofit.BOTH);
techGrid.setAutoWidth();
techGrid.setHeight(600);
techGrid.setAutoFetchData(true);
When the window opens, the HLayout is drawn with a relatively small size, the buttons of the rulesHLayout get drawn and spaced over that small width - but following correctly the rule to allow enough space to draw the icons and allow for their title overflows - so it looks correct but is of a small width.
The grid then fetches it's data an re-draws to fit the data and headings to a much WIDER correctly drawn grid, with the AutoFit function drawing it correctly.
However the HLayout and its buttons do not get re-drawn to match the grid size, and its layout looks compressed against the grid. If I resize the window the HLayout then redraws and spaces the button out appropriately, one to the left, one in the middle and the last on the right.
Is there some 'automatic' way to get the HLayout to resize when the gird auto-fits, or do I have to add a fetchData Handler to the grid, and mark the window for re-draw when it is called back?
Comment