Frames gadget

Just starting out? Need help? Post your questions and find answers here.
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 164
Joined: Thu Dec 28, 2023 9:04 pm

Frames gadget

Post by rndrei »

How do I disable frames on gadgets, such as ListIconGadget, EditorGadget?
infratec
Always Here
Always Here
Posts: 7625
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Frames gadget

Post by infratec »

In which OS ?
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 164
Joined: Thu Dec 28, 2023 9:04 pm

Re: Frames gadget

Post by rndrei »

MacOS
mrbungle
Enthusiast
Enthusiast
Posts: 152
Joined: Wed Dec 30, 2020 3:18 am

Re: Frames gadget

Post by mrbungle »

I think the poster means the focus ring.
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 164
Joined: Thu Dec 28, 2023 9:04 pm

Re: Frames gadget

Post by rndrei »

StringGadget has a flag #PB_String_BorderLess!
What about ListIconGadget and EditorGadget?
Axolotl
Addict
Addict
Posts: 853
Joined: Wed Dec 31, 2008 3:36 pm

Re: Frames gadget

Post 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() 
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Axolotl
Addict
Addict
Posts: 853
Joined: Wed Dec 31, 2008 3:36 pm

Re: Frames gadget

Post 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), @"", @"")
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 164
Joined: Thu Dec 28, 2023 9:04 pm

Re: Frames gadget

Post by rndrei »

Figured it out! If it's useful to someone :wink:

Code: Select all

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