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

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

fgGradientButtons (Buttons with Gradient-Color)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-10-2009, 02:14 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default fgGradientButtons (Buttons with Gradient-Color)

Hi,

here is my new library. With this library you can create a button with a gradient and rounded corners.

The desktop version is just a dummy library, it generates only normal buttons with no gradient.

.NET Compact Framework 2.0 or higher is required.

The zip file also includes a examples and a Help-File.


Version 1.002 ;
  1. Property "WithPressedEffect" with Shadow effect.
  2. Button with AutoScale


Version 1.004 ;
  1. The desktop version is no longer a dummy library.
  2. Fixed errors on Shadow effect


Version 1.005 ;
  1. I changed the order of parameters in the method new2:
  2. from ...left,top,height,width,.. to ...left,top,width,height,..


Version 1.006 ;
  1. 2 new Property and 1 new method added:
  2. DockStyle
  3. AnchorStyles
  4. AddContextMenu


Version 1.007 ;
  1. Property ControlRef added:
  2. errors corrected in the Anchor property

Version 1.008 ;
  1. Property ImageMode added: cCenterImage, cStretchImage, cNormalImage
  2. Property TextAlignment added: alLeft, alCenter, alRight

Version 1.009 ;
  1. B4P-Autoscale added
  2. Property WithShadows added
  3. Property WithPressedEffect changed: 1.Clik=Button pressed, 2.Clik= Button released
  4. Events added: ButtonPressed, ButtonReleased


Ciao,
Filippo
Attached Images
File Type: jpg capture001.jpg (12.5 KB, 62 views)
Attached Files
File Type: zip Example_v1.009.zip (44.2 KB, 130 views)
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________

Last edited by Filippo : 08-22-2010 at 01:58 PM. Reason: Update
Reply With Quote
  #2 (permalink)  
Old 10-10-2009, 02:47 PM
ExcludeReality's Avatar
Senior Member
 
Join Date: Nov 2008
Location: Greenville, South Carolina
Posts: 166
Default

Very useful library!
Personally I like to design my own buttons with Paint.NET, but this is a terrific idea.
I'm sure it will come in handy

JOOC; Why is this library not available for desktop?
__________________
Codito, ergo sum
"I code, therefore I am"

Last edited by ExcludeReality : 10-10-2009 at 02:50 PM.
Reply With Quote
  #3 (permalink)  
Old 10-10-2009, 02:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Great work. Thanks
Reply With Quote
  #4 (permalink)  
Old 10-10-2009, 03:30 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Filippo
A very nice and usefull library, Thank you.

Can you please add a short description (instead of us playing with the example until all is clear ?).

Edit: I can see all through the menu !
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 10-10-2009 at 03:52 PM.
Reply With Quote
  #5 (permalink)  
Old 10-11-2009, 12:38 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi derez,

a short Help-File is included.

@ExcludeReality
Quote:
JOOC; Why is this library not available for desktop?
I do not knows why but it will not just work.
But I don't care about. It's important for me that it works on the pocketpc.

Ciao,
Filippo
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #6 (permalink)  
Old 11-07-2009, 02:23 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi filippo,

I am porting some of my code into a dll, hoping that doing so will make it work faster and smoother.. It uses 1 of your FgGradiantButtons, and I would like to keep them..So I ask if you could share the .cs file, for merging, and if I can have your permition to merge it into my dll, with given credits.
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #7 (permalink)  
Old 11-07-2009, 03:18 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Filippo View Post
I do not knows why but it will not just work.
It needs visual styles enabling for the application on the desktop but the gradient still doesn't show
.
Code:
    obj1.New1(False)
obj1.CreateNew(
"System.Windows.Forms.Application" & obj1.System_Windows_Forms)
obj1.RunMethod(
"EnableVisualStyles")
obj1.SetProperty(
"VisualStyleState""ClientAndNonClientAreasEnabled")
EDIT:- Forget visual styles, I was wrongly assuming it was an override of a standard Button. After poking around a bit I see that the desktop library does not actually try to implement the gradient filled button but is just an ordinary one. Filippo must have found some difficulty in getting the code to work on the desktop .
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 11-07-2009 at 03:33 PM.
Reply With Quote
  #8 (permalink)  
Old 11-07-2009, 05:21 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Cableguy,

my DLL is written in vb.net, so there is none. cs-file.

@agraham
Quote:
Filippo must have found some difficulty in getting the code to work on the desktop .
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #9 (permalink)  
Old 11-07-2009, 05:36 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Could you please share the source so that we/I can try to port to c#?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #10 (permalink)  
Old 11-09-2009, 05:44 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi,

i have updated my library, Version 1.002.
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
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
Grouping radio buttons Caravelle Questions (Windows Mobile) 10 09-16-2009 11:25 AM
convert Color to B4ppc's color? Byak@ Questions (Windows Mobile) 2 07-13-2009 11:52 AM
NumUpdDown buttons skipper Questions (Windows Mobile) 1 01-22-2009 04:37 PM
Flashing text in buttons cdeane Questions (Windows Mobile) 6 04-14-2008 07:26 PM
Where are the buttons?? joedoe77 Questions (Windows Mobile) 2 12-24-2007 02:20 PM


All times are GMT. The time now is 07:01 AM.


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