Visual C++ ide style gradient interface?

BlitzMax Forums/BlitzMax Programming/Visual C++ ide style gradient interface?

AntonyWells(Posted 2005) [#1]
Is it possible to do cool Visual studio net, nero style gradient guis. sort of like panels but blue tinted. can this be done with soem sort of manifst tool or they special win32 only gadgets maxgui doesn't implement yet?


WendellM(Posted 2005) [#2]
Like this?


It loads a gradient image as a pixmap on a standard MaxGUI panel and resizes it to fit the window:


gradient_blue.png used by above code, though any image could be used.

A manifest file isn't needed for that, but one is for the XP-look gadgets (I use Faena's utility).


Smokey(Posted 2005) [#3]
It's working here

but terribly slow when resizing with the lastest update and synco.


WendellM(Posted 2005) [#4]
You're right about the slowness. Since it doesn't matter if this vertical gradient pixmap tiles horizontally, it can be sped up by replacing "GadgetWidth( window )" with, say, "1" in both calls to ResizePixmap. This wouldn't work with a pixmap that you don't want to tile horizontally, but it does speed things up considerably here.

I also just noticed that the pixmap degrades the more it's resized, so a "virgin" copy needs to be kept. The code below has both of these changes (using the same .PNG):



BlackSp1der(Posted 2006) [#5]
But....
there is a problem when you manage a pixmap over a panel, the continuous refresh of the pixmap eats memory.


taxlerendiosk(Posted 2006) [#6]
How do you make labels etc. look right not have a grey box around them?


WendellM(Posted 2006) [#7]
there is a problem when you manage a pixmap over a panel

OK, seems it isn't a perfect solution... :) Maybe the proper one (instead of this panel workaround) requires some sort of Windows system-level stuff like denzilquixode uses to fix tabbers here.


How do you make labels etc. look right not have a grey box around them?

Sorry, I think you'll have to ask BRL about that one - it seems to be a (hopefully temporary) limitation of MaxGUI. One of my first posts after MaxGUI's release wondered why SetGadgetColor and SetGadgetAlpha often don't do anything.