Regarding StringGadget and EditorGadget Border Colors

Just starting out? Need help? Post your questions and find answers here.
User avatar
DanLJr
Posts: 58
Joined: Wed Jul 04, 2018 4:24 am
Location: USA

Regarding StringGadget and EditorGadget Border Colors

Post by DanLJr »

What am I doing wrong here?

Code: Select all

 SetGadgetColor(#MyStringGadget, #PB_Gadget_LineColor, $FF0000)
No matter what I set the last value to, the border is always gray when the textbox is not "active" (being typed into at the moment), and the "active" (containing the cursor) textbox border is always some soft blue color. (Latest FireFox on PC to test.)
User avatar
DanLJr
Posts: 58
Joined: Wed Jul 04, 2018 4:24 am
Location: USA

Re: Regarding StringGadget and EditorGadget Border Colors

Post by DanLJr »

DanLJr wrote:What am I doing wrong here?

Code: Select all

 SetGadgetColor(#MyStringGadget, #PB_Gadget_LineColor, $FF0000)
No matter what I set the last value to, the border is always gray when the textbox is not "active" (being typed into at the moment), and the "active" (containing the cursor) textbox border is always some soft blue color. (Latest FireFox on PC to test.)
FYI: The same code with #PB_Gadget_FrontColor or #PB_Gadget_BackColor does exactly what you'd expect.

Any ideas?
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Regarding StringGadget and EditorGadget Border Colors

Post by Peter »

DanLJr wrote:Any ideas?
SB-Help wrote: #PB_Gadget_LineColor : Color for gridlines
So #PB_Gadget_LineColor is not for the border color.

Do you want to change the border color of all StringGadgets or just one of them?

Greetings ... Peter
User avatar
DanLJr
Posts: 58
Joined: Wed Jul 04, 2018 4:24 am
Location: USA

Re: Regarding StringGadget and EditorGadget Border Colors

Post by DanLJr »

Peter wrote:Do you want to change the border color of all StringGadgets or just one of them?
Honestly, I'd like to know how to do both!

I likely would want to set the default, sure, but I may have a reason to change an individual textbox's border color (or a group of text control's border colors, etc.) as desired.

So, both answers would be appreciated.

Thanks as always, Peter!

-Dan
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Regarding StringGadget and EditorGadget Border Colors

Post by Peter »

All StringGadgets:

Code: Select all

! $("<style> .dijitTextBox{border-color:red} </style>").appendTo("head");

A specific TextGadget:

Code: Select all

GID = GadgetID(0)
! $(v_gid.div).find(".dijitTextBox").css("border-color", "red");
User avatar
DanLJr
Posts: 58
Joined: Wed Jul 04, 2018 4:24 am
Location: USA

Re: Regarding StringGadget and EditorGadget Border Colors

Post by DanLJr »

Peter,

Thanks for the workaround.

Is there a BASIC way to do it? This seems like something pretty straightforward, simple, and fundamental. I'm very surprised that it's not supported in the language natively??? (if I wanted to write JavaScript, I would just write JavaScript. The whole point of this for me is to keep it BASIC. I want to be able to go to the help file for anything that I need to do. I don't want to have to research another language and be forced to turn to the outside world to get answers on how to do something in a programming language that isn't natively supported every time I try to do something new. I should be able to get all of my answers from the language itself.)

When is the rest of this type of stuff going to be incorporated into SB directly? (A new version with more robust handling of...everything...coming soon??? 2.20 has been out for some time now - 3.0 due soon, I hope???)
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Regarding StringGadget and EditorGadget Border Colors

Post by Peter »

DanLJr wrote:Is there a BASIC way to do it?
no, if there was one, I would have pointed it out to you.
DanLJr wrote:I want to be able to go to the help file for anything that I need to do.
no programming language supports all features. However, we are lucky enough to be able to implement missing features in SpiderBasic relatively easily with JavaScript. So we don't have to wait for a new program version that contains the desired feature. And if you can't do it yourself, you'll usually get help quickly in this forum.

Certainly it would be better if missing features in SpiderBasic were quickly offered natively, but it seems as if Fred doesn't have much time at the moment. For this reason I wouldn't hope for a new version in the near future.

Greeting ... Peter
Post Reply