Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2

    Unanswered: Displaying text variables on a form

    Hi all
    This post probably directed at James but is open to all.
    After reading James's input regarding dynamic labels I think I can see a way to display text variables without writing data to a stored field ( trying to avoid fragmentation by writing and deleting data). Using html fields seems to allow any variable to be displayed but like many things it does not appear quite that simple as the html field needs formating imformation to display correctly - that is to resemble a standard BD field. Wondering if we could have standard block of code that one just needs to insert the variable name.
    Have never looked seriously at html but this has stimulated my interest (thanks James).
    Regards
    David

  2. #2
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    See attached.

    Press the button “Populate Variable” and the HTML field will update to display the amount of records in the current folder.

    The HTML code will never need to be modified. Whatever value you send to the variable called label1 will be displayed in that field.

    Regards
    James
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hello James
    Thank you, this is basicly what is needed to get started. By altering the colour values and pixel width in the supplied code this should do exactly what is required. Hopefuly this method will reduce the problem of optimization being needed frequently. I wish BD would expand their help file to cover more of the advanced topics like this or the "special action" in script editer as examples. Just when you think there is no way to do some thing in BD, the answer is just under the surface.
    Have a nice day
    David

  4. #4
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Hi David.

    Just looking over my html code and it was a bit sloppy. Here's a more refined version.

    Code:
    <head>
    <body scroll="no">
    <style>
    body {
    overflow: hidden;
    }
    </style>
    </head>
    <div style="position: absolute; top: 0px; left: 0px; width: 120px; height: 23px; z-index: 1">
    <table border="1" width="120px" cellspacing="0" cellpadding="0" bgcolor="#ffffbd">
    <tr>
    <td>
    <p align="center">[$label1]</td>
    </tr>
    </table>
    </body>
    By altering the colour values and pixel width in the supplied code this should do exactly what is required
    In the updated version above there's now only one colour setting, so you don't have to enter your colour twice.

    One of them was obsolete anyway because brilliant database does allow you to set a background colour for a HTML page at all. To get around this, I used a Table with a single Cell which is something brilliant database does allow you to set a background colour to.

    I wish BD would expand their help file to cover more of the advanced topics like this or the "special action" in script editer as examples.
    Me too. Win SendMessage, running external DLL files along with the special action would be on my wish list to learn but there's little to no information in the manual on these.

    Just when you think there is no way to do some thing in BD, the answer is just under the surface.
    Absolutely.

    Regards
    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •