Page 1 of 2
Update the gadgets and IDE and Form Creator
Posted: Sat Aug 30, 2014 7:31 am
by moob
hi...
the gadgets is very old you need update them and add more functions.
gadgets like SpinGadget, ListIcon and others need an update to have a modern look or giving more functions.
SpinGadget like this

and so on
you have paid little attention to the gadgets.
Please update the gadgets.
thanks...
Re: Update the gadgets or add more functions
Posted: Sat Aug 30, 2014 7:54 am
by PB
The gadgets use the items of the OS. Your SpinGadget image in your
post looks like that on my Windows 7 PC. Are you saying that's wrong,
or that's right? Your post isn't clear.
Re: Update the gadgets or add more functions
Posted: Sat Aug 30, 2014 12:15 pm
by STARGĂ…TE
You have to enable: "modern look" in the compiler settings.
Re: Update the gadgets or add more functions
Posted: Sat Aug 30, 2014 12:40 pm
by PB
His SpinGadget screenshot is the modern look, though.
So I don't know what he's complaining about?

Re: Update the gadgets or add more functions
Posted: Sat Aug 30, 2014 2:38 pm
by Bisonte
If you want another styles... Use the CanvasGadget() and create your own gadgets. It's easy to do...
Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 6:04 am
by moob
PB 5.30
VS 2013
why the numbers of PB is on the right?
So, why update PB if you can do the things easily by windows API?
the Gadgets on PB is not update or added new Gadgets or new functions for years.
statusbar, listicon, editor, button with align text left, center, right and with icon and so on, need add more functionality to the Gadgets...
Need better IDE, better form creator with all Gadgets and all Gadgets functions in form creator.
for you guys no need update, you can do the others things too with windows API or with CanvasGadget, so why keeping update PB.
the latest updates of PB focus on 3D, and for what? To create mediocre games? with interfaces of 80's/90's?
I use PB for simplicity and to create little applications and for me the Gadgets is essentially.
Re: Update the gadgets or add more functions
Posted: Sun Aug 31, 2014 6:44 am
by davido
@moob
Personally I prefer the way the gadgets are, however, just add the number of spaces you require, after the number:
Code: Select all
If OpenWindow(0, 0, 0, 140, 70, "SpinGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SpinGadget (0, 20, 20, 100, 25, 0, 1000)
SetGadgetState (0, 5) : SetGadgetText(0, "5") ; set initial value
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
If EventGadget() = 0
SetGadgetText(0, Str(GetGadgetState(0)) + " ")
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
Re: Update the gadgets or add more functions
Posted: Sun Aug 31, 2014 6:55 am
by moob
davido wrote:@moob
Personally I prefer the way the gadgets are, however, just add the number of spaces you require, after the number:
Code: Select all
If OpenWindow(0, 0, 0, 140, 70, "SpinGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SpinGadget (0, 20, 20, 100, 25, 0, 1000)
SetGadgetState (0, 5) : SetGadgetText(0, "5") ; set initial value
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
If EventGadget() = 0
SetGadgetText(0, Str(GetGadgetState(0)) + " ")
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
@davido
is not look great nor functionality
but thanks
I know I can do by windows API
Code: Select all
#UDS_HOTTRACK = $0100
hMain=OpenWindow(0, 0, 0, 50, 50, "SpinGadget", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
hSpinField = StringGadget(0,20,20,42,20,"",#ES_LEFT|#PB_String_Numeric)
CreateUpDownControl_(#WS_CHILD|#WS_BORDER|#WS_VISIBLE|#UDS_ALIGNRIGHT|#UDS_SETBUDDYINT|#UDS_HOTTRACK|#UDS_ARROWKEYS,10,10,80,20,hMain,1,GetModuleHandle_(0),hSpinField,500,0,250)
SetGadgetAttribute(0, #PB_String_MaximumLength, 3)
Repeat
EventID.l = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
Quit = 1
EndIf
Until Quit = 1
End
But is much better if update the gadgets and add more functionality like I say in previous post

Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 7:30 am
by DK_PETER
@moob
That's a tall order you got there.
@Davido
That's not a good way to lock it at 10 spaces..You need to subtract the length from the total space count
and then put the value in.
Or simply make your own version: Something like this..
Code: Select all
Procedure.i SpinEvents()
StartDrawing(CanvasOutput(0))
Box(0,0,100,25,$FFFFFF)
DrawingMode(#PB_2DDrawing_Outlined)
Box(0,0,100,25, 0)
DrawingMode(#PB_2DDrawing_Transparent)
DrawText(0,4, Str(GetGadgetState(1)),0)
StopDrawing()
EndProcedure
If OpenWindow(0, 0, 0, 140, 70, "SpinGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 20, 100, 25)
SpinGadget (1, 120, 20, 10, 25, 0, 1000)
BindGadgetEvent(1, @SpinEvents())
SetGadgetState (1, 5)
SpinEvents()
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
EDIT: I do agree, that the ExplorerCombo- Explorerlist- and Explorertree need some 'touch up', though.
Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 8:02 am
by PB
> why the numbers of PB is on the right?
Probably to match Mac/Linux. Remember, each gadget in PureBasic
has to be cross-platform and match the other operating systems.
Nothing is Windows-specific unless you force it with API tweaks.
> the Gadgets on PB is not update or added new Gadgets or new functions for years
For the reason I just gave above. They won't be updated to do
things that Mac/Linux gadgets don't support. Just the way it is.
> Need better IDE, better form creator with all Gadgets
Visual Studio is made by the world's biggest software company
with thousands of developers. PureBasic has 2 main developers.
How about cutting them some slack?
Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 8:54 am
by davido
@DK_PETER,
Thank you for putting me right.
Didn't think much of my method, except that it did appear to work.

Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 11:09 am
by DK_PETER
@Davido
@moob
Extended the above example a bit.
The sky's the limit, when using the canvas.
Code: Select all
Structure _Spin_Props
Alignment.i
Textcolor.i
BackColor.i
BorderColor.i
bgImage.i
EndStructure
Global spprop._Spin_Props
Procedure.i SpinEvents()
With spprop
StartDrawing(CanvasOutput(0))
Box(0,0,100,25, \BackColor)
If IsImage(\bgImage) > 0
DrawImage(ImageID(\bgImage),0,0,GadgetWidth(0),GadgetHeight(0))
EndIf
DrawingMode(#PB_2DDrawing_Outlined)
Box(0,0,100,25, \BorderColor)
DrawingMode(#PB_2DDrawing_Transparent)
Select \Alignment
Case 0
DrawText(0,4, Str(GetGadgetState(1)), \Textcolor)
Case 1
DrawText((GadgetWidth(0)/2) - (TextWidth(Str(GetGadgetState(1)))/2), 4, Str(GetGadgetState(1)), \Textcolor)
Case 2
DrawText(GadgetWidth(0)-(TextWidth(Str(GetGadgetState(1)))+2), 4, Str(GetGadgetState(1)), \Textcolor)
EndSelect
StopDrawing()
EndWith
EndProcedure
If OpenWindow(0, 0, 0, 140, 70, "SpinGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 20, 100, 25)
SpinGadget (1, 108, 20, 10, 25, 0, 1000,#PB_Canvas_Border)
BindGadgetEvent(1, @SpinEvents())
SetGadgetState (1, 5)
spprop\Alignment = 2
spprop\BackColor = $555555
spprop\Textcolor = $FFFFFF
spprop\BorderColor= $CCFFCC
spprop\bgImage = 0
SpinEvents() ;Init spin
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Hope that is fancy enough.
Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 11:24 am
by IdeasVacuum
...but why would you want numbers justified left? They should be justified right, the way PB does it.
It would be nice if the PB team could ensure that at least #PB_Gadget_FrontColor and #PB_Gadget_BackColor are respected for every gadget, supporting colour for only some gadgets is counter-productive.
How about an officially supported set of canvas-based gadgets to replace the OS sets? They would be cross-platform, and more flexible.
Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 11:38 am
by ts-soft
IdeasVacuum wrote:How about an officially supported set of canvas-based gadgets to replace the OS sets? They would be cross-platform, and more flexible.
+1 but only optional
Re: Update the gadgets and IDE and Form Creator
Posted: Sun Aug 31, 2014 11:45 am
by PB
> They should be justified right, the way PB does it
Hmm, I looked at other apps and they're all left, not right.
So it seems PureBasic is the black sheep of the family here.