Skip to content

HtmlPanel of full WebDektopApp #364

Closed

Description

@itg-assistant

Michael Bought asked 2016-11-08 05:55:26 UTC

1.-

Hi, I'm adding a HtmlPanel to my Desktop...

I tried ...

myHtmlPanel.Height = Me.Height

myHtmlPanel.Width = Me.Width

The HtmlPanel, has a

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

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2016-11-08 19:44:36 UTC

    Hi Michael,

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

    • 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
     });
    
    1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions