I got the need to export a ListBox contents into a html document and so I wrote a Method to do that.
The result is nice even if the columns withs have troubles because of the differences in the used Fonts (System in Xojo, Times ? in html).
Then, two days after and a travel to the local hospital, I wanted to add a user selected background colors (header / rows).
At html write time, I decided to use Hex to write the color:
Color_Fldr = "#" + Hex(List_Color_Folder.Red) + Hex(List_Color_Folder.Green) + Hex(List_Color_Folder.Blue)
And of course, as the docs says, I get
<tr bgcolor=#07F0> instead of
The result was a nice green - I do not know if this was what I was asking
I checked in the documentation, and even the API2 have the same behavior (and they show a workaround).
My bad: I will use RGB instead, but how many wasted time ?
BTW: I checked (because I am curious) as eager to know I am, in the Web part, and WebHex does not exists (I typed WebHex: try it for a grin).
When the code start to be unreadable, my mouth start to be like The Clown (from Batman): usually, this kind of code start to be glibberish to my eye after some hours
For those who knows: is Hex working the same in other developement environments ?
The new code is:
Color_Head = "style=""background-color:rgb(" + Str(Table_Header_Bkgnd_Color.Red) + Str(Table_Header_Bkgnd_Color.Green) + Str(Table_Header_Bkgnd_Color.Blue) + """)"
Each newly written feature needs new stuff (often searches)… at some point in the future, I will start to ask myself why I continue (to code, to embellish my applications, to use a computer, to…).
This is sad.