1.-
Hi, I’m adding a HtmlPanel to my Desktop…
I tried …
myHtmlPanel.Height = Me.Height
myHtmlPanel.Width = Me.Width
The HtmlPanel, has a <div> with the background-color set to red.
But this div is not of all the DesktopBackground..
2.-
Can I manipulate a Wisej.Control from javascript?.. Example myHtmlPanel.name = “mypan”
then…. Eval(“document.getElementByName(‘mypan’).style.visible = ‘hidden’;”)
I tried, but doesn’t work
Thanks
Hi Michael,
See answers below. If you tell me what you need to do I may be able to give more accurate answers.
Application.Desktop.Controls.Add(new HtmlPanel() { Dock = DockStyle.Fill, Html = "<div style='background-color:yellow'>Hello</div>", BackColor = Color.White });
2. Yes you can manipulate Wisej widgets from JavaScript. See https://docs.wisej.com/docs/concepts/javascript-object-model
There is a whole object model and large methods to use. The code you posted is trying to alter an html element, not a javascript control. When you use Call() or Eval() the JavaScript code is executed in context so you can do Call(“hide”) or Eval(“this.hide()”). However, there is no reason to do that since the control already has Hide() and Show() and if you call the methods on the client, Wisej will update the server back.
Best,
Luca