Page 1 of 1

Frames gadget

Posted: Sun Sep 14, 2025 12:35 pm
by rndrei
How do I disable frames on gadgets, such as ListIconGadget, EditorGadget?

Re: Frames gadget

Posted: Sun Sep 14, 2025 12:44 pm
by infratec
In which OS ?

Re: Frames gadget

Posted: Sun Sep 14, 2025 12:48 pm
by rndrei
MacOS

Re: Frames gadget

Posted: Mon Sep 15, 2025 12:14 pm
by mrbungle
I think the poster means the focus ring.

Re: Frames gadget

Posted: Mon Sep 15, 2025 12:37 pm
by rndrei
StringGadget has a flag #PB_String_BorderLess!
What about ListIconGadget and EditorGadget?

Re: Frames gadget

Posted: Mon Sep 15, 2025 12:40 pm
by Axolotl
Well, I thought that the frame is the reason for this gadget.
I used to always take a ContainerGadget and a TextGadget. Now with the 'new' flag #PB_Frame_Container I changed it.
So my answer would be:

Code: Select all

ContainerGadget(Gadget, X, Y, W, H, #PB_Container_BorderLess)
CloseGadgetList() 

Re: Frames gadget

Posted: Mon Sep 15, 2025 12:45 pm
by Axolotl
Here is what I do with EditorGadget. Should work with ListIconGadget as well. And should be OS-independend.

Code: Select all

ContainerGadget(Gadget, X, Y, W, H, #PB_Container_BorderLess)
  EditorGadget(Gadget2, X-1, Y-1, W+2, H+2) 
CloseGadgetList() 
I know, there is also this theme thing on windows... IMHO that works only if you avoid the scrollbars...

Code: Select all

;   SetWindowTheme_(GadgetID(Gadget), @"", @"")

Re: Frames gadget

Posted: Wed Sep 17, 2025 9:07 pm
by rndrei
Figured it out! If it's useful to someone :wink:

Code: Select all

CocoaMessage(0, CocoaMessage(0, GadgetID(gadget), "enclosingScrollView"), "setDrawsBackground:", #NO)