I have created this custom control, that mimics some of the look/feel of the iOS Tab/Toolbar.
The developer has control over the size of the icons, the normal, disabled and selected colors
and the cool thing (I think), is you don’t need to create “special” icons. You just draw a normal square graphic of any size, and the control will resize it if necessary, and automatically create a proper grayscale masked image,
You can add icons on the fly, you can hide icons, as well as programmtically select/enable or disable them. When you add/hide an icon, the control automatically recalculates the required padding/spacing, giving a very dynamic ability.
It basically has one EVENT (ValueChanged) which indicates the index of the selected icon
here is the code that created the above example
//
// if you want to alter icon or text size, you must
// do it as the FIRST thing in OPEN event
//
me.iconSize=48
me.textSize=22
//
me.AddItem(icon_start,"Start")
me.AddItem(icon_print,"Print")
me.AddItem(icon_info,"About")
me.AddItem(icon_home,"Home")
me.AddItem(icon_help,"Help")
me.AddItem(icon_config,"Config")
Default iconSize is 32, and textsize is 0, in the example I left the “default” colors, but they can be overridden as well, including the background color
Downloaded it and the demo works good. Started porting it to support operation in a Web application; if things go well I will send you the code to include with your download.
[quote=251248:@Will Shank]Nice I’ve only fiddled with the demo so far and it looks good flush against the bottom.
One little thing I noticed is that the icons jump in stages while resizing. Making x and pad Doubles in zReAlign makes that smoother.[/quote]
Modified as you suggested, thanks, but I will wait a day or so before I upload it again, incase others see things I missed
in the meantime for those of you that have the code… make these simple changes
FUNCTION zRealign(g as graphics)
// 05Mar16 : converted W,Pad and X to Double from Integer
Dim i As Integer
Dim w As Double=0
Dim cnt As Integer=0
Dim pad As Double=0
Dim x As Double
.... rest of function