Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] Preference Window and SmoothResizeMBS (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] SQL Plugin question
Next thread: [MBS] [ANN] 11.1pr1


Re: [MBS] MBS Real Studio Audio Plugin crash   -   Garth Hjelte
  [MBS] Preference Window and SmoothResizeMBS   -   Dean Davis
   Re: [MBS] Preference Window and SmoothResizeMBS   -   Dean Davis
   Re: [MBS] Preference Window and SmoothResizeMBS   -   Arnaud Nicolet
   Re: [MBS] Preference Window and SmoothResizeMBS   -   Christian Schmitz

[MBS] Preference Window and SmoothResizeMBS
Date: 22.01.11 14:38 (Sat, 22 Jan 2011 08:38:30 -0500)
From: Dean Davis
I'm trying to recreate the look and feel of a standard preference
window in my program.
I have a window with a toolbar with toggle buttons.
Then I have two canvases that contain the controls I want to show when
each button is pushed.

Looking at a couple of preferences windows in other programs what
happens when you click a toolbar button is that the current controls
go invisible then the window smooth resizes then the new controls
appear.
The controls do fade in and out but I'm not worried about that part.
So I do have code working that does all of this in the Action event of
the toolbar instance on my window.
The issue is that all the code is in the action and things like...
"canvas1.visableúlse"
"canvas2.visableúlse"

doesn't work since the window doesn't update until the all the code in
the action event had run.
Moving code to a method the action event calls doesn't help.
UpdateNow, UpdateNowMBS and even a "delaymbs 1" right after setting
the canvases to invisible doesn't help.

I haven't tried making the canvases invisible then starting a timer to
call the update method, I'm pretty sure that would work.
Just looking for some more elegant solution that I may be missing
before trying the timer.

Dean Davs
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Preference Window and SmoothResizeMBS
Date: 25.01.11 16:31 (Tue, 25 Jan 2011 10:31:03 -0500)
From: Dean Davis
Thanks, ended up using a timer and it worked fine.
This is the first time I used an RB Toolbar and I'm surprised at how
difficult they made it to use.
Lots of hoops to jump through to make it behave like a standard
toolbar for a preference window.

Dean Davis
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Preference Window and SmoothResizeMBS
Date: 24.01.11 13:40 (Mon, 24 Jan 2011 13:40:57 +0100)
From: Arnaud Nicolet
Le 22 janv. 11 à 14:38, Dean Davis a écrit:

> Just looking for some more elegant solution that I may be missing
> before trying the timer.

Have you tried with a thread? It's still more elegant than a timer and
you call the already-existing code. Also, I think it would solve the
problem.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Preference Window and SmoothResizeMBS
Date: 22.01.11 15:08 (Sat, 22 Jan 2011 15:08:51 +0100)
From: Christian Schmitz

Am 22.01.2011 um 14:38 schrieb Dean Davis:

> I haven't tried making the canvases invisible then starting a timer to
> call the update method, I'm pretty sure that would work.

A timer with a short period.

1. action: make controls invisible
2. action: resize
n. action: make controls visible

Depending on how long the resize takes, you may need to count until some high value.

Greetings
Christian