Update the gadgets and IDE and Form Creator

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
moob
User
User
Posts: 68
Joined: Mon Aug 01, 2011 6:16 pm

Update the gadgets and IDE and Form Creator

Post 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 Image and so on

you have paid little attention to the gadgets.

Please update the gadgets.


thanks...
Last edited by moob on Sun Aug 31, 2014 7:00 am, edited 1 time in total.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Update the gadgets or add more functions

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
STARGÅTE
Addict
Addict
Posts: 2226
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Update the gadgets or add more functions

Post by STARGÅTE »

You have to enable: "modern look" in the compiler settings.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Update the gadgets or add more functions

Post by PB »

His SpinGadget screenshot is the modern look, though.
So I don't know what he's complaining about? :? :?:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: Update the gadgets or add more functions

Post by Bisonte »

If you want another styles... Use the CanvasGadget() and create your own gadgets. It's easy to do...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
moob
User
User
Posts: 68
Joined: Mon Aug 01, 2011 6:16 pm

Re: Update the gadgets and IDE and Form Creator

Post by moob »

PB 5.30

Image


VS 2013

Image


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.
Last edited by moob on Sun Aug 31, 2014 6:46 am, edited 1 time in total.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Update the gadgets or add more functions

Post 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
DE AA EB
moob
User
User
Posts: 68
Joined: Mon Aug 01, 2011 6:16 pm

Re: Update the gadgets or add more functions

Post 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 ;)
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Update the gadgets and IDE and Form Creator

Post 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.
Last edited by DK_PETER on Sun Aug 31, 2014 8:58 am, edited 1 time in total.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Update the gadgets and IDE and Form Creator

Post 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?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Update the gadgets and IDE and Form Creator

Post by davido »

@DK_PETER,

Thank you for putting me right. :)
Didn't think much of my method, except that it did appear to work. :oops:
DE AA EB
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Update the gadgets and IDE and Form Creator

Post 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.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Update the gadgets and IDE and Form Creator

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Update the gadgets and IDE and Form Creator

Post 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
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Update the gadgets and IDE and Form Creator

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply