HtmlPanel of full WebDektopApp

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

 

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

 

 

 

  • You must to post comments
0
0

Hi Michael,

See answers below. If you tell me what you need to do I may be able to give more accurate answers.

  1. The HtmlPanel is sized as any other panel. The html is sized depending on the content in order to be able to scroll the overflow. I tried the follow code and it works well. However, you cannot fill the part below the task bar by design, since the workspace is on top of the taskbar, otherwise windows would maximize below. The Desktop already has a Wallpaper property to change the wallpaper, which is also themeable, and it has an extension with source code able to pull in images from Bing.
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 http://wisej.com/docs/html/JavaScriptObjectModel.htm

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

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json