A smarter button

There is a lot of buttons out there I know but I have yet to find a button like this where you can have more than one button in “one button” (see screen shot). Especially at no cost.

RkSmartButton on display.

RkSmartButton on display.

I belive this is all you need to get started using rkSmartButton. I have tried to make it easy to use but there are a few things worth noticing… to show a popupmenu on any of the buttons you must set a flag in ButtonsPopup property which will look, something like this: 0010 “0″ means do not show “1″ means show. In this case only third button will get the popup. I also use this technic for enabling buttons and keeping hold of which one is down. No popup will be shown if CheckButtons is set. Popupmenu is shown after the button is pressed and hold down for the time given in PopupDelay property (like in Chrome). To get images on button add an imagelist and set the indexes in the ImageIndexes property. Use format like this: 0,1,2,7,4. To know which button was pressed use SelectedIndex property. Button number one gets the index of 0.

Thats it, hope you like it.

Next up is an update of SmartPathBar.

Download: Project with source

Tags: , , , , ,

  • andrefm

    Hi Roy, another great compo. Really nice.
    Simple and good looking button.

    Just one correction. The DPR demo uses the unit UNIT1.PAS, but should be MAIN.PAS (included in file).

    Thanks and best regards
    André

  • enzo_amd

    Hi! It's very nice button. :)

    I want to ask you to show how to work with Vista GlassFrame?
    How to draw images, labels on it?
    I know it's offtopic. Sorry.

  • admin

    Thanks! I will change the demo when I update the component. It was a bit difficult to enable and disable buttons using strings so I added another metode. I also found a small painting bug … Will be updated soon.

    Roy M Klever

  • admin

    Hi,

    I have been trying the last week to find any documentation of how to work with glassframe but it for sure aint much out there… What I have found out is that you have to use GDI+ to make it work properly. I have just started testing GDI+ and my next component will use it but I do not think it will support glassframe yet. I will be experimenting a little about GDI+ and see what I can figure out but no promises. I could also need a guide on this topic :)

    Roy M Klever

  • http://ciberia.ya.com/mcgvix/ Marcelo

    wow… very cool button, thanks.

    Roy,

    did you know something (a function) to remove “noise” from colored images (photos) ?

    tks

    Marcelo

blog comments powered by Disqus