Friends
Is there some relatively simple way to change or eliminate the borders and backgrounds on controls, especially the text input controls? I just want a borderless, colorless text input box (and label).
Thank you,
fritz
Changing borders and backgrounds on form controls
-
- New User
- Posts: 5
- Joined: Sat Oct 16, 2021 7:33 pm
Re: Changing borders and backgrounds on form controls
In the designer, or in your running app? Because you asked in the designer forum, so it sounds like this is a designer request?
-
- New User
- Posts: 5
- Joined: Sat Oct 16, 2021 7:33 pm
Re: Changing borders and backgrounds on form controls
I'm totally new, so I'm assuming most design configurations would be somehow encompassed in the form designer, but obviously many IDEs (like Xojo or VB.NET) let you change visual attributes in code. If I can't change these attributes in the designer itself, I'll try it in code. Can you do that?
Thank you,
fritz
Thank you,
fritz
Re: Changing borders and backgrounds on form controls
For Windows, do you mean something like this?
Code: Select all
If OpenWindow(0, 400, 200, 322, 60, "StringGadget", #PB_Window_SystemMenu)
StringGadget(0, 8, 20, 306, 20, "Type here...", #PB_String_BorderLess)
SetGadgetColor(0, #PB_Gadget_BackColor, GetSysColor_(#COLOR_3DFACE))
SetActiveGadget(0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
-
- New User
- Posts: 5
- Joined: Sat Oct 16, 2021 7:33 pm
Re: Changing borders and backgrounds on form controls
Well, that's a mouthful, but I'll give it a shot.
Thanks very much,
fritz
Thanks very much,
fritz
Re: Changing borders and backgrounds on form controls
What's a mouthful? That code? That's literally nothing. Welcome to coding!
-
- New User
- Posts: 5
- Joined: Sat Oct 16, 2021 7:33 pm
Re: Changing borders and backgrounds on form controls
I guess it's all relative. Compared to VB.Net and PHP/CSS, your graphic alterations seem pretty encyclopedic. Now that I think of it, TKinter Python is way less wordy with borders and backgrounds. Xojo is okay with text boxes, but any other kind of input field is pretty counterintuitive when you want to change the gui defaults. Of course, my reaction to your kindly provided example is exacerbated by the simple fact that I know nothing about PureBasic.
Thanks,
fritz
Thanks,
fritz
Re: Changing borders and backgrounds on form controls
You mean this single line of code to eliminate the background color?
Code: Select all
SetGadgetColor(0, #PB_Gadget_BackColor, GetSysColor_(#COLOR_3DFACE))
-
- New User
- Posts: 5
- Joined: Sat Oct 16, 2021 7:33 pm
Re: Changing borders and backgrounds on form controls
I'm sure it would all seem more comprehensible if I had a background in PureBasic. As I mentioned, VB.Net and PHP have spoiled me. And, it is true, that one line you sent, stripped of all the other stuff, seems perfectly readable to me.