Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Gradient buttons

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2010, 08:05 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default Gradient buttons

I found that designing gradient buttons with B4PPC is much easier than with .Net ...
Here are few subs that create a new button or convert an existing button to a gradient button, with few examples for design.

I put Filippo's button as another example.

I believe anybody can modify or create his design for the button he likes most.

with reference to an imagebutton, the additional parameters are:
Startcolor and endcolor, direction - left to right or top to bottom, corners type (actually the design type) and invert-when-pushed effect.

Somehow I kept the movement of the button when pressed down.You can select for shadow but the shadow change sides only with the inversion effect.

The left column in the example show buttons with invert_when_pushed effect, the middle column - without.
The last two buttons demonstrate the fixed arc and variable arc when the width of the button changes.

Button1 is a regular button for comparison.
Button2 is a regular button which was converted by the convert_button sub.

few notes:
1. The last design is based on drawing with a circle, and this function may leave untouched pixels, as you can see in the example, so I don't recomend to use it.
2. You can't change the size of the button after creating it ( you can but the bitmap doesn't change), so if you want to change the size - dispose the button and re-create it with the new size.

edit - updated to have optional shadow.
Attached Images
File Type: jpg Gradient.jpg (23.5 KB, 100 views)
Attached Files
File Type: sbp Gradient_buttons2.sbp (9.1 KB, 79 views)
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 02-15-2010 at 11:40 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
fgGradientButtons (Buttons with Gradient-Color) Filippo Additional Libraries 43 08-22-2010 02:55 PM
NumUpdDown buttons skipper Questions (Windows Mobile) 1 01-22-2009 05:37 PM
Image Buttons & FormEXDesktop RandomCoder Questions (Windows Mobile) 5 10-10-2008 12:50 PM
Flashing text in buttons cdeane Questions (Windows Mobile) 6 04-14-2008 08:26 PM
Where are the buttons?? joedoe77 Questions (Windows Mobile) 2 12-24-2007 03:20 PM


All times are GMT. The time now is 12:49 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0