UpDownGadget New Function
Posted: Wed Jul 03, 2002 5:55 pm
Code updated for 5.20+
Restored from previous forum. Originally posted by Keith.
Hi,
I've just created a UpDown Gadget because the SpinGadget() dosent look 100%
like the ones you see in windows allthought it is the real thing. but the one
I've created looks like the ones you see in applications made in VB, C++,
Delphi etc. Heres the code its a Procedure because I dont know any C or ASM so
I cant make a library.
Thanks
Keith
Restored from previous forum. Originally posted by Keith.
Hi,
I've just created a UpDown Gadget because the SpinGadget() dosent look 100%
like the ones you see in windows allthought it is the real thing. but the one
I've created looks like the ones you see in applications made in VB, C++,
Delphi etc. Heres the code its a Procedure because I dont know any C or ASM so
I cant make a library.
Code: Select all
Procedure UpDownGadget(ID, Window, X,Y,W,Val,Min,Max)
StringGadget(ID,X,Y,W,20,"")
Buddy=StringGadget(ID+1,X+2,Y+2,W-22,16,Str(Val),#PB_String_BorderLess | #PB_String_Numeric)
DisableGadget(ID,1)
CreateUpDownControl_(#WS_CHILD | #WS_VISIBLE | #UDS_SETBUDDYINT | #UDS_ARROWKEYS, X+W-19, Y+2, 15, 16, WindowID(Window), 1, 0, Buddy, Max, Min, Val)
EndProcedure
Keith