Textbox.bordercolor - does wiseJ do this?

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

In VWG we had BorderColor on most of our built in VWG controls.  I am not seeing that in intelli-sense and it appears to cause an error when I try to just type it in.

Does WiseJ support this?  If not, is there anything close that I could do?

I was going to put a red border around the textbox if it was required….

Thanks,

Shawn

  • You must to post comments
0
0

If you change the AppearanceKey then you have to restore it. Try

public string HobbsAlert => HobbsFinish == HobbsStart ? “textbox” : “required”;

Wisej only renders the changed apperance key name.

 

  • Luca (ITG)
    Forgot to add: in the mixin you need only 1 style entry, the color. The base appearance already has the border width.
  • Neil Brown
    Great, thanks!
  • You must to post comments
0
0

Hi,

I’m resurrecting this thread with a related issue.

I have implemented the “required” functionality sucessfully in code, however there seems to be a bug when databinding …

With the following property in the bound entity:
public string HobbsAlert => HobbsFinish ==  HobbsStart ? “” : “required”;
And the following binding:
this.textBox1.DataBindings.Add(new Wisej.Web.Binding(“AppearanceKey”, this.bsLesson, “HobbsAlert”, true));

It works until the first “required”, ie. the textbox remains normal while moving through records without a HobbsAlert, but as soon as one is encountered the textbox goes red (correctly) but then remains red regardless of HobbsAlert.

Cheers,
Neil

  • Kizaemon
    Have you tried to add the 5th parameter when creating Binding? this.textBox1.DataBindings.Add(new Wisej.Web.Binding(“AppearanceKey”, this.bsLesson, “HobbsAlert”, true, Wisej.Web.DataSourceUpdateMode.OnPropertyChanged)); The property HobbsAlert should fire PropertyChanged event of containing class’es INotifyPropertyChanged.
  • You must to post comments
0
0

Hi Shawn,

I don´t see an attachment in your post.

Please find here a simple sample with one textbox that is set to “required”:

http://wisej.s3.amazonaws.com/support/attachments/BorderColorTest.zip

Hope that helps.

Best regards
Frank

  • You must to post comments
0
0

Thank you for the response.  I don’t know what the AppearanceKey.

Are you saying that the textbox would have a “normal” appearance, then if I did the mixin, and set .AppearanceKey = “Required”, that it would than have a red boarder?

Sorry to ask such a basic question, but I don’t appear to know what I am doing 🙂

I have attached the mixin file that I created.

  • You must to post comments
0
0

Hi Shawn,

there are a couple of ways to achieve this. One is using a theme mixin
where you can control much more than just the border color.

Here is a simple sample:

{
“appearances”: {
“required”: {
“inherit”: “textbox”,
“states”: {
“default”: {
“styles”: {
“width”: [ 1, 1, 1, 1 ],
“style”: [ “solid”, “solid”, “solid”, “solid” ],
“color”: “red”
}
}
}
}
}
}

Just create a new file called e.g. RequiredRed.mixin.theme, set it´s content to the lines above and add it to your Themes folder.

Then change the AppearanceKey of required TextBoxes to “required” and they appear with red border.

Hope that helps.

Best regards
Frank

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.