|
Hi,
How do you remove the flickering when modifying the dotnet control size within a dialog?
I’ve noticed some scripts have worked around the problem (the excellent HCG Asset Browser Pro has achieved a flicker-free scaleable UI).
I`ve added some code below to demonstrate the problem. Scale the floating dialog and observe the old 8bit-loading-style flicker. I`ve purposely coloured the background colour of the dialog black to emphasise the issue.
rollout Roll_DotNet "Dot Net - Flicker Example" (
DotNetControl DotNetTest "FlowLayoutPanel" width:500 height:500 pos:[0,0]
on Roll_DotNet Resized Sze do
(
DotNetTest.Width=Sze.x
DotNetTest.Height=Sze.y
)
)
CreateDialog Roll_DotNet width:500 height:500 style:#(#style_titlebar, #style_border, #style_sysmenu, #style_resizing, #style_minimizebox) bgcolor:(color 0 0 0)
Thanks,
Andy
Max 9.0 through 2010, XP-Pro 64 SP2.
ATI Radeon HD 4800 series
Core 2 Quad Q9650 3.0GHz, 8Gb Ram, DX9.0c.
|
|
|
|
I’ve noticed the same thing. Though I don’t know how to fix that problem, I have started using DotNet Forms instead of rollouts/dialogs. I have more control over my UI and get less weird bugs like that.
/*Attempt to close if dialog is already open*/
try (
dotNetDialog.close()
)
catch()
/*This is used instead of Maxscript Dialog/Rollout*/ dotNetDialog = dotNetObject "MaxCustomControls.MaxForm" dotNetDialog.size = dotNetObject "System.Drawing.Size" 500 500
dotNetDialog.Text = "Dot Net - NO Flicker Example"
/*Setup FlowLayout and set dockstyle to Fill: no need to re-adjust size :)*/ dotNetUI = dotNetObject "FlowLayoutPanel" dockStyle = dotNetClass "System.Windows.Forms.DockStyle" dotNetUI.Dock = dockStyle.Fill
/*Add Controls to Dialog*/ dotNetDialog.Controls.add dotNetUI
/*Show/Create Dialog*/ dotNetDialog.Show()
You have to do a bit more dotNet with this though so it may not suite your particular script. Hope this helps!
thedour.net
Render 3D @ ScriptSpot.com
|
|
|
|
Thanks for your help.
That is definitely an improvement over the standard Maxscript UI dialog.
andy
Max 9.0 through 2010, XP-Pro 64 SP2.
ATI Radeon HD 4800 series
Core 2 Quad Q9650 3.0GHz, 8Gb Ram, DX9.0c.
|
|
|