Search found 4896 matches

by RASHAD
Wed Nov 26, 2025 1:49 am
Forum: Coding Questions
Topic: Setting a Child Window into Parent
Replies: 9
Views: 222

Re: Setting a Child Window into Parent

PB ParentID is like Windows API #GWL_HWNDPARENT
It only keeps the child window over the parent window not as exact child
You can try restrict the child window moving
Next is just to show what I mean


;EnableExplicit
Define wndFlags
Define x,y,w,h

Enumeration Windows
#wnd_Main
#wnd_Child1 ...
by RASHAD
Sun Nov 16, 2025 8:40 am
Forum: Windows
Topic: Make selected PanelGadget tab bold?
Replies: 10
Views: 381

Re: Make selected PanelGadget tab bold?

That is very strange
I do have 4K LG Monitor 3840x2160 Scale 150%
PB 6.21 x64 Windows 11 x64
Did all the variation without any problem
Any how next is a Workaround

LoadFont(0,"Georgia",14,#PB_Font_Bold)
If OpenWindow(0, 0, 0, 600, 400, "PanelGadget", #PB_Window_SystemMenu | #PB_Window ...
by RASHAD
Sun Nov 16, 2025 6:35 am
Forum: Windows
Topic: Make selected PanelGadget tab bold?
Replies: 10
Views: 381

Re: Make selected PanelGadget tab bold?

You are welcome
With RED color also


Global oldCallback

LoadFont(0,"Georgia",12,#PB_Font_Bold )
LoadFont(1,"Tahoma",10)

Procedure panelCB(hWnd, uMsg, wParam, lParam)
result = CallWindowProc_(oldCallback, hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_DRAWITEM
*Pan.DRAWITEMSTRUCT = lParam ...
by RASHAD
Sun Nov 16, 2025 5:18 am
Forum: Windows
Topic: Make selected PanelGadget tab bold?
Replies: 10
Views: 381

Re: Make selected PanelGadget tab bold?

Quick hack


Global oldCallback

LoadFont(0,"Georgia",12,#PB_Font_Bold )
LoadFont(1,"Tahoma",10)

Procedure panelCB(hWnd, uMsg, wParam, lParam)
result = CallWindowProc_(oldCallback, hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_DRAWITEM
*Pan.DRAWITEMSTRUCT = lParam
If *Pan\CtlType = #ODT ...
by RASHAD
Sat Nov 15, 2025 4:18 am
Forum: Coding Questions
Topic: convert editorgadget text to utf8 string
Replies: 16
Views: 514

Re: convert editorgadget text to utf8 string

Hi
Try

#CP_UTF8 = 65001
String$ = "Hélé"

nBytes = WideCharToMultiByte_(#CP_UTF8, 0, @String$, -1, 0, 0, 0, 0)
Dim Buffer(nBytes - 2)
nBytes = WideCharToMultiByte_(#CP_UTF8, 0, @String$, -1, @Buffer(0), nBytes - 1, 0, 0)
Debug PeekS(@buffer())


*Buffer = UTF8(String$)
Debug PeekS(*Buffer, -1)
by RASHAD
Sat Nov 15, 2025 2:32 am
Forum: Coding Questions
Topic: convert editorgadget text to utf8 string
Replies: 16
Views: 514

Re: convert editorgadget text to utf8 string

Hi
Try using

Code: Select all

	*Buffer = UTF8(String$)
by RASHAD
Thu Nov 13, 2025 1:29 am
Forum: Coding Questions
Topic: EditorGadget - reset the style of the copied text.
Replies: 16
Views: 527

Re: EditorGadget - reset the style of the copied text.


OpenWindow(0, 200, 50, 640, 400,"RTF Load,Save & Print", #PB_Window_SystemMenu|#PB_Window_ScreenCentered | #PB_Window_SizeGadget)
CreatePopupImageMenu(0,#PB_Menu_ModernLook)
MenuItem(0, "&Open")
OpenSubMenu("&Save As..")
MenuItem( 1, "RTF File")
MenuItem( 2, "Plain Text")
CloseSubMenu()
MenuBar ...
by RASHAD
Wed Nov 12, 2025 3:18 pm
Forum: Coding Questions
Topic: EditorGadget - reset the style of the copied text.
Replies: 16
Views: 527

Re: EditorGadget - reset the style of the copied text.

RTF Editor Gadget
Drop down menu support
MS Windows short cut commands support

OpenWindow(0, 200, 50, 640, 400,"RTF Load,Save & Print", #PB_Window_SystemMenu|#PB_Window_ScreenCentered | #PB_Window_SizeGadget)
CreatePopupImageMenu(0,#PB_Menu_ModernLook)
MenuItem(0, "&Open")
OpenSubMenu("&Save As ...
by RASHAD
Fri Nov 07, 2025 9:20 pm
Forum: Coding Questions
Topic: [SOLVED] Proper handling of Checkbox Gadget ??
Replies: 7
Views: 388

Re: Proper handling of Checkbox Gadget ??

Hi Randy
Your checkbox id is 2 not 1
And better use

Code: Select all

If GetGadgetState(2) = 1
by RASHAD
Fri Nov 07, 2025 7:33 pm
Forum: Coding Questions
Topic: ColorRequester
Replies: 1
Views: 190

Re: ColorRequester

Hi
Try

Code: Select all

                If kleur > -1
                  Debug "Gekozen kleur: " + Str(kleur)
                EndIf
by RASHAD
Wed Nov 05, 2025 5:32 am
Forum: Coding Questions
Topic: Sort a ListViewGadget -- How to?
Replies: 7
Views: 426

Re: Sort a ListViewGadget -- How to?

Hi
Quick hack not tested :D

OpenWindow(0, 0, 0, 800,600, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListViewGadget(0, 10, 10, 780, 500, #LBS_SORT | #LBS_NOINTEGRALHEIGHT | #LBS_HASSTRINGS)
StringGadget(1, 10, 515, 400, 24, "")
ButtonGadget(2, 10, 542, 160, 24, "Add Item")
ButtonGadget ...
by RASHAD
Fri Oct 31, 2025 5:55 pm
Forum: Coding Questions
Topic: minimize+Restore Loses all my gadgets
Replies: 31
Views: 1507

Re: minimize+Restore Loses all my gadgets

Hi Randy
I have a feeling about your use of #WM_SIZE
Next is my last shoot
Use one of them in your window callback
I wish you luck

Case #WM_SYSCOMMAND
Select wParam
Case #SC_MAXIMIZE
Debug WindowX(?)
Debug WindowWidth(?)

Case #SC_RESTORE
ShowWindow_(WindowID(?),#SW_HIDE)
ResizeWindow(?,0 ...
by RASHAD
Wed Oct 29, 2025 8:17 am
Forum: Coding Questions
Topic: Missing ToolBar in Wine
Replies: 3
Views: 406

Re: Missing ToolBar in Wine

Hi
Try the next maybe

UsePNGImageDecoder()

If OpenWindow(0, 0, 0, 150, 150, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered|#PB_Window_SizeGadget)
If CreateToolBar(0, WindowID(0),#PB_ToolBar_Large )
Path$ = #PB_Compiler_Home + "Examples" + #PS$ + "Sources" + #PS$ + "Data" + #PS ...
by RASHAD
Wed Oct 29, 2025 8:15 am
Forum: Coding Questions
Topic: minimize+Restore Loses all my gadgets
Replies: 31
Views: 1507

Re: minimize+Restore Loses all my gadgets

If you are using SetWindowCallback(@ProcedureName() [, #Window [, Mode]])
Add the next

Case #WM_SYSCOMMAND
Select wParam
Case #SC_RESTORE
PostMessage_(WindowID(?), #WM_LBUTTONDOWN, 0, 0)
PostMessage_(WindowID(?), #WM_LBUTTONUP, 0, 0)
EndSelect


If your gadgets inside a Canvas Container ...