--- In [email protected], Adrian Williams <adri...@...> wrote: > > Hi gang, > > I've been toying with the outstanding flexmdi component from flexlib > and have found something challenging... > > One of the pieces of the MDIWindow is the minimize() function. I'm > creating the windows on the canvas dynamically based on the users last > know settings...including whether they have minimized any of the windows > on their dashboard. I have a variable in their record for each window > called isCollapsed (bit/bool). What I'm trying to do is when the > records are read and the windows are dynamically created, I check to see > if the isCollapsed == true and if so, I'm trying to fire the > MDIWindow.minimize() function. However, it's expecting a mouseEvent and > I'm not sure how to force a non-existent event into the function??? > > Basically, I need to programmatically emulate a mouseclick on the > minimize button of the window. > > I've tried a number of alternative methods without success, > including these: > > newWindow.minimize(); > newWindow.minimize(null); > > newWindow.dispatchEvent(MDIWindowEvent.MINIMIZE); > dispatchEvent(new > MDIWindowEvent(MDIWindowEvent.MINIMIZE, newWindow));
Try newWindow.minimize(new MouseEvent(MouseEvent.click)); or something similar

