Hi
Without posting a workable snippet can't guess your requirement
But you can use Str,StrD,StrF
If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(0, 8, 8, 306, 133)
For a = 0 To 5
AddGadgetItem(0, a, "Line "+Str(a)+" " +StrF(14678 ...
Search found 4840 matches
- Mon Aug 25, 2025 1:01 pm
- Forum: Coding Questions
- Topic: Input of floating point numeric number in a window
- Replies: 5
- Views: 230
- Tue Aug 12, 2025 9:19 am
- Forum: Coding Questions
- Topic: win or Mac, this code crashes
- Replies: 6
- Views: 381
Re: win or Mac, this code crashes
Can't test it ,it's a miss :)
Change ProcedureReturn 0 to ProcedureReturn 1
I hope it will be OK
Procedure dessine(canva.i, x.l, Array moyennes.d(1)); 1 pOUR VECTEUR !!!
StartDrawing(CanvasOutput(canva))
Box(0, 0, OutputWidth(), OutputHeight(), $FFFFFF) ; efface en blanc
For i = 0 To #w-1 ...
Change ProcedureReturn 0 to ProcedureReturn 1
I hope it will be OK
Procedure dessine(canva.i, x.l, Array moyennes.d(1)); 1 pOUR VECTEUR !!!
StartDrawing(CanvasOutput(canva))
Box(0, 0, OutputWidth(), OutputHeight(), $FFFFFF) ; efface en blanc
For i = 0 To #w-1 ...
- Tue Aug 12, 2025 9:14 am
- Forum: Coding Questions
- Topic: why I cannot write a procedure in the loop event
- Replies: 19
- Views: 862
Re: why I cannot write a procedure in the loop event
Can't test it ,it's a miss :)
Change ProcedureReturn 0 to ProcedureReturn 1
I hope it will be OK
Procedure dessine(canva.i, x.l, Array moyennes.d(1)); 1 pOUR VECTEUR !!!
StartDrawing(CanvasOutput(canva))
Box(0, 0, OutputWidth(), OutputHeight(), $FFFFFF) ; efface en blanc
For i = 0 To #w-1 ...
Change ProcedureReturn 0 to ProcedureReturn 1
I hope it will be OK
Procedure dessine(canva.i, x.l, Array moyennes.d(1)); 1 pOUR VECTEUR !!!
StartDrawing(CanvasOutput(canva))
Box(0, 0, OutputWidth(), OutputHeight(), $FFFFFF) ; efface en blanc
For i = 0 To #w-1 ...
- Sun Aug 10, 2025 10:05 pm
- Forum: Coding Questions
- Topic: Hide a Container gadget
- Replies: 1
- Views: 144
Re: Hide a Container gadget
Hi
Can you post a workable snippet because HideGadget(?,1) work as expected ?
PB 6.21 x64 win 11 x64
If OpenWindow(0, 0, 0, 322, 150, "ContainerGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ContainerGadget(0, 8, 8, 306, 133, #PB_Container_Raised)
ButtonGadget(1, 10, 15, 80, 24 ...
Can you post a workable snippet because HideGadget(?,1) work as expected ?
PB 6.21 x64 win 11 x64
If OpenWindow(0, 0, 0, 322, 150, "ContainerGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ContainerGadget(0, 8, 8, 306, 133, #PB_Container_Raised)
ButtonGadget(1, 10, 15, 80, 24 ...
- Sat Aug 09, 2025 3:33 pm
- Forum: Tricks 'n' Tips
- Topic: 2D FFT image quantization
- Replies: 3
- Views: 264
Re: 2D FFT image quantization
Very nice work idle
I have a feeling that you are very close to to do AI enlarge image instead of compress it using PB
Thanks for sharing
I have a feeling that you are very close to to do AI enlarge image instead of compress it using PB
Thanks for sharing
- Wed Aug 06, 2025 8:55 pm
- Forum: Coding Questions
- Topic: Get MouseLeave event while mouse button is pressed
- Replies: 3
- Views: 206
Re: Get MouseLeave event while mouse button is pressed
For Windows
Procedure test()
Debug "*OUT*"
EndProcedure
If OpenWindow(0, 0, 0, 220, 220, "CanvasGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 200, 200); ,#PB_Canvas_ClipMouse
BindEvent(#PB_Event_Gadget,@test(),0,0,#PB_EventType_MouseLeave)
Repeat ...
Procedure test()
Debug "*OUT*"
EndProcedure
If OpenWindow(0, 0, 0, 220, 220, "CanvasGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 200, 200); ,#PB_Canvas_ClipMouse
BindEvent(#PB_Event_Gadget,@test(),0,0,#PB_EventType_MouseLeave)
Repeat ...
- Wed Jul 30, 2025 9:24 pm
- Forum: Coding Questions
- Topic: GetExtensionPart fails with a space
- Replies: 17
- Views: 575
Re: GetExtensionPart fails with a space
Code: Select all
Procedure.s MyGetExtensionPart(path.s)
For i = 1 To 20
ext.s = Right(path,i)
If Left(ext,1) = "."
ext = Right(ext,i-1)
Break
EndIf
Next
ProcedureReturn ext
EndProcedure
path.s = "c:\test\file.file.file.john doe"
Debug MyGetExtensionPart(path)
- Wed Jul 30, 2025 4:16 pm
- Forum: Coding Questions
- Topic: GetExtensionPart fails with a space
- Replies: 17
- Views: 575
Re: GetExtensionPart fails with a space
I like the game
Code: Select all
Procedure.s MyGetExtensionPart(path.s)
pos = FindString(path,".")
extn = Len(path)-pos
ProcedureReturn Right(path,extn)
EndProcedure
Debug MyGetExtensionPart("c:\test\file.john doe")
- Wed Jul 30, 2025 12:00 pm
- Forum: Coding Questions
- Topic: Scrolling two (or more) ListViewGadgets synchron
- Replies: 9
- Views: 308
Re: Scrolling two (or more) ListViewGadgets synchron
Hi Lord
I suggest using ListIcon Gadget
It will cost you a little bit more coding
But it's much much better than the ListView Gadget
You can scroll Val & Hal ,Mouse Wheel & Keyboard
In case you need more speed with lot of content you can use virtual ListIcon
Global oldCallback
Procedure ...
I suggest using ListIcon Gadget
It will cost you a little bit more coding
But it's much much better than the ListView Gadget
You can scroll Val & Hal ,Mouse Wheel & Keyboard
In case you need more speed with lot of content you can use virtual ListIcon
Global oldCallback
Procedure ...
- Wed Jul 30, 2025 11:23 am
- Forum: Coding Questions
- Topic: GetExtensionPart fails with a space
- Replies: 17
- Views: 575
Re: GetExtensionPart fails with a space
How about :mrgreen:
Procedure.s MyGetExtensionPart(txt$)
txt$ = ReplaceString(txt$," ","*#?")
ext$ = GetExtensionPart(txt$)
ext$ = ReplaceString(ext$,"*#?"," ")
ProcedureReturn ext$
EndProcedure
Debug MyGetExtensionPart("c:\test\file.john doe") ; Returns "" instead of "john doe"
Procedure.s MyGetExtensionPart(txt$)
txt$ = ReplaceString(txt$," ","*#?")
ext$ = GetExtensionPart(txt$)
ext$ = ReplaceString(ext$,"*#?"," ")
ProcedureReturn ext$
EndProcedure
Debug MyGetExtensionPart("c:\test\file.john doe") ; Returns "" instead of "john doe"
- Wed Jul 30, 2025 11:14 am
- Forum: Coding Questions
- Topic: GetExtensionPart fails with a space
- Replies: 17
- Views: 575
Re: GetExtensionPart fails with a space
Hi BarryG
More simple (I think)
Procedure.s MyGetExtensionPart(txt$)
txt$ = ReplaceString(txt$," ","_")
ext$ = GetExtensionPart(txt$)
ext$ = ReplaceString(ext$,"_"," ")
ProcedureReturn ext$
EndProcedure
Debug MyGetExtensionPart("c:\test\file.john doe") ; Returns "" instead of "john doe"
More simple (I think)
Procedure.s MyGetExtensionPart(txt$)
txt$ = ReplaceString(txt$," ","_")
ext$ = GetExtensionPart(txt$)
ext$ = ReplaceString(ext$,"_"," ")
ProcedureReturn ext$
EndProcedure
Debug MyGetExtensionPart("c:\test\file.john doe") ; Returns "" instead of "john doe"
- Tue Jul 29, 2025 12:03 pm
- Forum: Coding Questions
- Topic: Scrolling two (or more) ListViewGadgets synchron
- Replies: 9
- Views: 308
Re: Scrolling two (or more) ListViewGadgets synchron
Hi Lord
You are welcome
Next using SubClassing
I hope it will be better than the first example
Added select too
Global oldCallback
Procedure lbCB(hWnd, uMsg, wParam, lParam)
result = CallWindowProc_(oldCallback, hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_VSCROLL,#WM_MOUSEWHEEL
If ...
You are welcome
Next using SubClassing
I hope it will be better than the first example
Added select too
Global oldCallback
Procedure lbCB(hWnd, uMsg, wParam, lParam)
result = CallWindowProc_(oldCallback, hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_VSCROLL,#WM_MOUSEWHEEL
If ...
- Tue Jul 29, 2025 10:25 am
- Forum: Coding Questions
- Topic: window With no Title And With no taskbar icon?
- Replies: 11
- Views: 457
Re: window With no Title And With no taskbar icon?
OpenWindow(1, -300, 0, 0, 0, "Not Needed", #PB_Window_Invisible)
OpenWindow(0, 1, 1, 115, 70, "xx",#PB_Window_ScreenCentered|#PB_Window_BorderLess)
SetWindowLongPtr_(WindowID(0),#GWL_HWNDPARENT,WindowID(1))
SetWindowColor(0,$9BD6F7)
ButtonGadget(0, 5, 5, 64, 24, "Exit")
Repeat
Select ...
- Tue Jul 29, 2025 10:13 am
- Forum: Coding Questions
- Topic: Scrolling two (or more) ListViewGadgets synchron
- Replies: 9
- Views: 308
Re: Scrolling two (or more) ListViewGadgets synchron
Hi Lord
For Windows only
Mouse wheel ,Vertical Scrollbar and Keyboard support
Procedure winCB(hWnd,uMsg,wParam,lParam)
Select uMsg
Case #WM_CTLCOLORLISTBOX
If lParam = GadgetID(1)
SendMessage_(GadgetID(2),#LB_SETTOPINDEX,GetScrollPos_(GadgetID(1),#SB_VERT),0)
ElseIf lParam = GadgetID(2 ...
For Windows only
Mouse wheel ,Vertical Scrollbar and Keyboard support
Procedure winCB(hWnd,uMsg,wParam,lParam)
Select uMsg
Case #WM_CTLCOLORLISTBOX
If lParam = GadgetID(1)
SendMessage_(GadgetID(2),#LB_SETTOPINDEX,GetScrollPos_(GadgetID(1),#SB_VERT),0)
ElseIf lParam = GadgetID(2 ...
- Thu Jul 24, 2025 1:53 am
- Forum: Tricks 'n' Tips
- Topic: Custom Menu [Windows]
- Replies: 15
- Views: 864
Re: Custom Menu [Windows]
@minimy
Thanks for testing
Have a good time
Thanks for testing
Have a good time