March 28, 2024, 11:05:06 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Exporting HTML

Started by Brian, June 01, 2023, 03:17:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hi, can anybody help me? I wish to draw a coloured box with 2-pixel lines - doesn't matter what size - and then export what I've got on screen to HTML code, so that I can paste the code into an IWB program. Any ideas for me?

Preferably freeware, considering the limited use I have for this project

Brian

Egil

A couple of years ago I read a series on HTML programming, and wondered if it was worth learning another programming language, but I just dropped it. But you will probalbly need some knowledge of HTML-5 programming and use of CSS to get your specific job done.

Sorry I can't help you, but these links can probably help you see what you are up against...:

https://developer.mozilla.org/en-US/docs/Web/CSS/box-lines

https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap


Good Luck!

Support Amateur Radio  -  Have a ham  for dinner!

Brian

Egil,

Had a quick look, and . . . not for me! Don't really want to learn another programming language. The KISS method for me, I think. Thanks for answering, though

Brian

LarryMc

Mind if I ask why the box has to wind up in HTML code in your IWB program?
Just trying to see if there is some other way to accomplish what you are trying to do.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Larry,

I am writing the box info to a Browser window. There could be one, or quite a few, boxes, and it is very easy to print the whole page when it is a Browser window

Brian

Egil

Brian,
Tonight I stumbled over the code below. Save the text as html and start it in a browser.
Should not be difficult to program IWB to produce similar code. This maybe what you are looking for?


Good Luck!
Egil

<html>
<head>
    <style>
        div {
            height: 75px;
            width: 500px;
            padding: 10px;
            font-size: 1.5rem;
        }
 
        #div1 {
            background-color: rgb(255, 0, 0);
        }
 
        #div2 {
            background-color: rgb(0, 192, 192);
        }
 
        #div3 {
            background-color: rgb(255, 0, 0, 0.1);
        }
 
        #div4 {
            background-color: rgb(0, 192, 192, 0.6);
        }
    </style>
</head>
 
<body>
    <h1 style="color: green">
        GeeksforGeeks
    </h1>
    <h3>
        Difference between RGB and
        RGBA color scheme
    </h3>
    <p>
          An RGB color value is specified
        with the rgb() function:
        rgb(red, green, blue)
    </p>
    <p>
          An RGBA color value is specified
        with the rgba() function:
        rgba(red,green,blue,opacity)
    </p>
    <div id="div1">Red with rgb()</div>
    <div id="div2">Color with rgb()</div>
 
    <div id="div3">
        Red with rgba()
        and alpha
    </div>
    <div id="div4">
        Color with rgba()
        and alpha
    </div>
</body>
</html>

Support Amateur Radio  -  Have a ham  for dinner!

Egil

I modified above code a little to better demonstrate what's going on:

<html>
<head>
    <style>
        div {
            height: 75px;
            width: 500px;
            padding: 10px;
            font-size: 1.5rem;
        }
 
        #div1 {
            background-color: rgb(255, 0, 0);
        }
 
        #div2 {
            background-color: rgb(0, 192, 192);
        }
 
        #div3 {
            background-color: rgb(255, 0, 0, 0.3);
        }
 
        #div4 {
            background-color: rgb(0, 192, 192, 0.3);
        }
    </style>
</head>
 
<body>
    <h1 style="color: green">
        GeeksforGeeks
    </h1>
    <h3>
        Difference between RGB and
        RGBA color scheme
    </h3>
    <p>
          An RGB color value is specified
        with the rgb() function:
        rgb(red, green, blue)
    </p>
    <p>
          An RGBA color value is specified
        with the rgba() function:
        rgba(red,green,blue,opacity)
    </p>
    <div id="div1">Red with rgb()</div>
    <div id="div2">Color with rgb()</div>
 
    <div id="div3">
        Red with rgba()
        and alpha 0.3
    </div>
    <div id="div4">
        Color with rgba()
        and alpha 0.3
    </div>
</body>
</html>

Support Amateur Radio  -  Have a ham  for dinner!