Import html and css code

Is any way to import HTML code in AppStudio and then type the logic of the program? If answer was yes, what about CSS code?

Importing HTML can be done fairly easily, but you won’t have access to all the features built in to AppStudio for controls added this way.

One method is to place a Container control somewhere on a form and then append some HTML markup into it using JavaScript at run time.

Alternatively, you could place markup inside the content property of a Container at design time. That’s a less flexible option, but it allows you to just drag and drop raw markup into the property rather than having to format it like a really long string.

There are other ways too, depending on how complex your needs are.

Sub Main()
  Dim markup
  markup = "<div style='padding: 16px;'>" & _
             "<button type='button'>" & _
               "HTML Button" & _
             "</button>" & _
End Sub

You can place CSS inline with your markup, use AppStudio’s Project CSS feature, or add it via JavaScript code.

Kind regards,

Each Form has a HTML property - it’s under a heading called Xpert. It opens up a regular edit window. You can put the HTML there.

In this case, you probably won’t be using the drag and drop interface that the Design Screen gives you, but you will be able to see what your HTML looks like there.

Thank you for your answers.