How to auto adjust height of GUI to the HTML content
Posted: 30 Aug 2021, 15:56
I'm trying to create a GUI using HTML & ActiveX but unable get the height to auto adjust to the HTML Content. This is a sample code and the content is variable (parsed from the internet) so heights varies every time.
Thanks for the help.
Code: Select all
#a::
words := "Cardano is a public blockchain platform. It is open-source and decentralized, with consensus achieved using proof of stake. It can facilitate peer-to-peer transactions with its internal cryptocurrency, ADA. Cardano was founded in 2015 by Ethereum co-founder Charles Hoskinson. The development of the project is overseen and supervised by the Cardano Foundation based in Zug, Switzerland. It is also the largest cryptocurrency to use a proof-of-stake blockchain, which is seen as a greener alternative to proof-of-work protocols."
f_ref := "Cardano"
Html =
(
<html><head><Style>
body {background-color: #333333; overflow: hidden}
p {font-family: 'Raleway'; font-size: 12pt; }
.words {color: #78ff78;}
.reference {color: #00ffff;}
</style></head><body>
<p class="words">%words%</p>
<p class="reference">%f_ref%</p>
</body></html>
)
Gui, +AlwaysOnTop -Caption +ToolWindow Border
gui margin,.5,.5
gui add, ActiveX, vWB w700 h220, HTMLfile
WB.write(html)
gui Show, AutoSize
Return