Hi guys, simple question here.
https://pasteboard.co/uGMs61mSXSA6.png
how do you set that space before the title of a window? Is this a global icon or can I set it per window?
Space before window title
Re: Space before window title
Quick'nDirty:
Code: Select all
EnableExplicit
Procedure SetWindowTitleIcon(Window, Icon.s)
If IsWindow(Window) = #False : ProcedureReturn : EndIf
Protected WID = WindowID(Window)
! var win = v_wid.window;
! var wintitle = $(win).find(".spiderwindow-title");
! wintitle.parent().prepend("<div style='position: absolute; top: 2px; left: 2px; height: 22px; width: 22px; line-height: 22px; text-align: center;'>" + v_icon + "</div>");
EndProcedure
OpenWindow(0, #PB_Ignore, #PB_Ignore, 600, 400, "WindowIconTest1", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
SetWindowTitleIcon(0, "😀")
OpenWindow(1, #PB_Ignore, #PB_Ignore, 300, 200, "WindowIconTest2", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
SetWindowTitleIcon(1, "😎")
-
- Posts: 27
- Joined: Tue Nov 22, 2022 4:36 am
Re: Space before window title
@Peter, much obliged as always!