#PB_Gadget_BorderLess

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 173
Joined: Thu Dec 28, 2023 9:04 pm

#PB_Gadget_BorderLess

Post by rndrei »

StringGadget has a flag #PB_String_BorderLess!
What about ListIconGadget and EditorGadget and other?
User avatar
jacdelad
Addict
Addict
Posts: 2019
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: #PB_Gadget_BorderLess

Post by jacdelad »

Easy to do on windows, with one API call. Don't know about other OSes though...
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
minimy
Enthusiast
Enthusiast
Posts: 642
Joined: Mon Jul 08, 2013 8:43 pm
Location: off world

Re: #PB_Gadget_BorderLess

Post by minimy »

with pb only, a dirty trick is use a container to remove the border :idea:

Code: Select all

ContainerGadget(0,0,0,100,30,#PB_Container_BorderLess)
EditorGadget(1,-2,-2,104,34)
If translation=Error: reply="Sorry, Im Spanish": Endif
Axolotl
Addict
Addict
Posts: 865
Joined: Wed Dec 31, 2008 3:36 pm

Re: #PB_Gadget_BorderLess

Post by Axolotl »

Well, he should have mentioned that we already discussed this in another post.
Re: Frames 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: 173
Joined: Thu Dec 28, 2023 9:04 pm

Re: #PB_Gadget_BorderLess

Post by rndrei »

Maybe in the future version, will you support #PB_Gadget_Borderless? Otherwise, ContainerGadget is not convenient to use!?
Axolotl
Addict
Addict
Posts: 865
Joined: Wed Dec 31, 2008 3:36 pm

Re: #PB_Gadget_BorderLess

Post by Axolotl »

There must be reasons why Fred hasn't implemented it in the first place. However, I don't know what they are.
Workarounds are always a bit cumbersome, but usually good enough to tide you over.
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).
mrbungle
Enthusiast
Enthusiast
Posts: 157
Joined: Wed Dec 30, 2020 3:18 am

Re: #PB_Gadget_BorderLess

Post by mrbungle »

For at least some gadgets like buttons, you can try something like the following where X is the ID of the gadget you want to remove the border from:

Code: Select all

CocoaMessage(0, GadgetID(X), "setBordered:", #NO)
Post Reply