Muller Stephan
Posts: 50
Joined: 2010-03-11
|
Hi everyone,
this is a low priority question, no need to hestitate.
I would like to know what is the best way to react on the IE resize event.
Currently I do the following:
private void coolbar_SizeChanged(object sender, EventArgs e)
{
timerResize.Interval = 150;
timerResize.Enabled = true;
}
private void timerResize_Tick(object sender, EventArgs e)
{
reposition();
timer1.Enabled = false;
}
Reposition() changes the position of controls so that they fit in the IE screen size.
This works fine. However it is kind of a nasty implementation; I don't like using the timer and think there is a better way to do it.
If I call reposition() directly in the SizeChanged, the controls are repositioned, but the toolbar's size is not in or decreased if neccessary.
I set the toolbar height with this code:
this.Module.ToolBars[0].ToolBarObj.Height = curheight;
(I only have one toolbar, so directly using Index 0 should be okay).
Kind Regards
Stephan Muller
PS: My toolbar is about to be finished 8) 8) 8) |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Stephan.
Please try to use the OnSendMessage event handler instead of the timer. To send a custom message to the toolbar you can use the SendMesage method of the ADXIEToolbar class. |
|