Hi guys....
I have this line of code...
borderWidth, BorderColor and radius are retrieved also using CSSUtils, like this:
I then trim the string to my needs ...
my issue is that, BorderColor gets a string like "#DCDCDC"...
I need to parse this STRING into a Color value...
Using the above (first) line of code, it does not give the border the passed color, But, if I do...
thus hardcoding the color value, it works as expected...
What am I doing wrong in the first code line?????
I have this line of code...
B4X:
CSSUtils.SetBorder(mBorder,BorderWidth,fx.Colors.From32Bit(Bit.ParseInt(BorderColor.Replace("#", ""), 16)),radius)
borderWidth, BorderColor and radius are retrieved also using CSSUtils, like this:
B4X:
Dim radius As String = CSSUtils.GetStyleProperty(mBase,"border-radius")
Dim BorderWidth As String = CSSUtils.GetStyleProperty(mBase,"border-width")
Dim BorderColor As String = CSSUtils.GetStyleProperty(mBase,"border-color")
I then trim the string to my needs ...
B4X:
radius = radius.SubString2(0,radius.LastIndexOf(","))
BorderWidth = BorderWidth.SubString2(0,BorderWidth.LastIndexOf(","))
my issue is that, BorderColor gets a string like "#DCDCDC"...
I need to parse this STRING into a Color value...
Using the above (first) line of code, it does not give the border the passed color, But, if I do...
B4X:
CSSUtils.SetBorder(mBorder,BorderWidth,fx.Colors.Gray,radius)
What am I doing wrong in the first code line?????