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.

SpecialButtons Library

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 08-22-2010, 10:10 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

a converter program, to convert regular buttons to RectangleButtons, is added to the first post.
It simplifies the visual design - you can place regular buttons using the IDE, then convert them to RectangleButtons using the converter.
The new definitions are stored in a "buttons.txt" file.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #12 (permalink)  
Old 08-26-2010, 03:54 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Version 1.6 enables vertical text to be displayed on Ellipse, Rectangle and State buttons, with SetVertical method added.

Edit: Forgot about autoscale in the vertical buttons. Corrected in 1.61.
Attached Images
File Type: jpg vertical.jpg (13.5 KB, 20 views)
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 08-27-2010 at 09:53 AM.
Reply With Quote
  #13 (permalink)  
Old 01-31-2012, 06:50 AM
Junior Member
 
Join Date: Mar 2010
Posts: 21
Default Can you possibly split the cs file?

I wonder if the cs file (of some 100 kB) can be split into single functional units (say, just "rounded buttons", and no more additional beauties) and distributed along with the complete lib here. This seems quite reasonable, from minimalists' viewpoint.
Reply With Quote
  #14 (permalink)  
Old 02-27-2012, 07:08 AM
Senior Member
 
Join Date: Sep 2008
Posts: 111
Default

Hy Derez!

First of all, Thank you for this fantastic collection.

I tried to set my rectanglebutton width programaticaly:
Code:
Object("doorCrtlProp").FromControl(Rectanglebutton("lblHelloRectangle").ControlRef)
Object("doorCrtlProp").SetProperty("Width","200")
But always get an error message:
!!!Invalied property!!!

Please tell me why!
Reply With Quote
  #15 (permalink)  
Old 02-27-2012, 11:16 AM
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

lblHelloRectangle.Width = 200
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #16 (permalink)  
Old 02-27-2012, 11:54 AM
Senior Member
 
Join Date: Sep 2008
Posts: 111
Default

Thank you agraham, but I get the property name prog. too

I need it to an "skinning" module
Reply With Quote
  #17 (permalink)  
Old 02-27-2012, 02:11 PM
Senior Member
 
Join Date: Sep 2008
Posts: 111
Cool

I think this is not the sexiest way :
Code:
Select ctrlType
        
Case "Fggradientbuttons"
            
Object("doorCrtlProp").FromControl(Fggradientbuttons(ctrlName).ControlRef) 'Everything works fine
        Case "Rectanglebutton"
            
If propName="Text" Then
                Rectanglebutton(ctrlName).Text=propVal
            
Else If propName="Left" Then
                Rectanglebutton(ctrlName).Left=propVal
            
Else If propName="Top" Then
                Rectanglebutton(ctrlName).Top=propVal
            
Else If propName="Width" Then
                Rectanglebutton(ctrlName).Width=propVal
            
Else If propName="Height" Then
                Rectanglebutton(ctrlName).Height=propVal
            
Else If propName="BringToFront"
                Rectanglebutton(ctrlName).BringToFront
            
Else If propName="Visible"
                Rectanglebutton(ctrlName).Visible=propVal
            
End If
...
Reply With Quote
  #18 (permalink)  
Old 05-18-2012, 04:09 PM
Newbie
 
Join Date: Apr 2012
Posts: 5
Default MouseDown event not working?

I tried to add a "ButtonDown" event, which in this library is named "MouseDown".

What am I doing wrong, so that I have this message:

Quote:
Object of type 'System.EventHandler' cannot be converted to type 'System.Windows.Forms.MouseEventHandler'.
The "click" event works ok, but this one works by you?

Thank you in advance for any helpful answer.

Code:
Sub Globals
End Sub
Sub App_Start
 Form1.Show
 rb3.New1(
"form1","RB3",150,40,80,30,cWhite,cBlack,1)
End Sub
Sub rb3_mousedown
 
Msgbox("Click")
End Sub
This one will give above mentioned error pointing the line "rb3.new1..."
Reply With Quote
  #19 (permalink)  
Old 05-18-2012, 05:17 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

I'm afraid it's a bug in the library. The Basic4ppc MouseDown and MouseUp events are incorrectly declared as MouseEventHandlers where they should be declared as plain EventHandlers.

The library itself has to have MouseEventHandlers to receive those events but it should pass them on to Basic4ppc as ordinary Events and not MouseEvents.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #20 (permalink)  
Old 05-19-2012, 10:32 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Agraham
I understand but I don't know how to correct it.
I have event declarations under the class:
Code:
public event EventHandler Click; 
private 
object[] eventObject; 
public event System.Windows.Forms.MouseEventHandler MouseDown;
private 
object[] eventObject1;
public event System.Windows.Forms.MouseEventHandler MouseUp; 
private 
object[] eventObject2;
and the events :
Code:
private void gb_Click(Object sender, EventArgs e) 
{
    gb.Image = bmpup ;
    
if (Click != null)
          Click(eventObject,
null);
}

private void gb_MouseDown(
Object sender, System.Windows.Forms.MouseEventArgs ed) 
{
    xpress =  width/
2 - ed.X;
    ypress =  height/
2 - ed.Y ;
    gb.Image = bmpdn ;
    
if (MouseDown != null)
        MouseDown(eventObject1,
null);
}

private void gb_MouseUp(
Object sender, System.Windows.Forms.MouseEventArgs eu) 
{
    gb.Image = bmpup ;
    
if (MouseUp != null)
        MouseUp(eventObject,
null);
}
Can you show me how to correct it ?
Thanks
__________________
David Erez
Ramat Hasharon, Israel
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
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


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


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