Announcement

Collapse
No announcement yet.

Visi Background Color

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ESPsupport
    commented on 's reply
    You can easily fix this now.
    Just edit C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\ViSi\GOLDELOX\FORM.INC with a text editor and remove the '%' on line 3

  • Vince_4D
    replied
    Hi Rob,

    Thank you for providing your project file.

    When I checked the file, I found out that the color property of each form did not correspond to the "supposedly output" of the Paste Code which is
    Code:
    gfx_Set(BACKGROUND_COLOUR, color);   // color corresponds to Color property of selected form
    gfx_Cls();
    Note that the transparency of the StaticText is relative to the set background of the form object (either color or an image).
    In your project, all of the forms have a BG color of black and that 's why when you set the Transparency of the StaticText to Yes, the StaticText BG color always turns out to be black.

    Again, sorry for the inconvenience that the issue has caused unto you.
    Hope this will help and best regards,

    Leave a comment:


  • Rob A
    replied
    Here you go.

    I was finding that when the FORMs text box property was set to transparent "yes", that the BG color would NOT show through In order for me to get the FORMs text box color to show the same color as the BG I would need to set the FORMs text box transparent property to "NO" AND set the text box color to the same as the BG color.
    Attached Files

    Leave a comment:


  • Vince_4D
    replied
    Hi,

    The transparency property basically mimics the color of the set BG color not equal to No Color.
    Also, I can't run the project you just sent. Kindly zip the file properly by clicking File>Zip Project in Workshop4. Thanks.

    Leave a comment:


  • Rob A
    replied
    Thanks, but you completely lost me on that answer below.

    "With regards to the transparency, any object that has transparency property will replace its transparent color with the set BG color. Hence, if you overlay an object with transparent property to another object, the transparent color reflected is not relative to the object being overlayed but to the color of the BG set."

    Leave a comment:


  • Vince_4D
    replied
    Hi,

    Yes, it is possible to copy the properties of the form. Do the following procedure:

    1. Click the Form as shown.
    Click image for larger version

Name:	1.PNG
Views:	57
Size:	16.6 KB
ID:	66517

    2. Select All objects using CTRL+A shortcut keys. You should see the properties as shown below.

    Click image for larger version

Name:	2.PNG
Views:	38
Size:	13.2 KB
ID:	66518

    3. Copy the objects using CTRL+C shortcut keys.
    4. Create a new Form.
    5. Then, paste the objects using CTRL+V shortcut keys.

    With regards to the transparency, any object that has transparency property will replace its transparent color with the set BG color. Hence, if you overlay an object with transparent property to another object, the transparent color reflected is not relative to the object being overlayed but to the color of the BG set.

    Hope this will help.

    Best regards,


    Leave a comment:


  • Rob A
    replied
    Hi,

    In Visi, is there any way to set up the FORM properties and be able to use that FORM as a template for other new duplicate forms?

    It gets time consuming and error prone having to re-select all the properties from scratch for each new FORM.

    Thanks
    Last edited by Rob A; 29th December 2018, 09:11 AM.

    Leave a comment:


  • Rob A
    replied
    I have been trying to get the screens to work with some logical sense and I find that when the text box portion of the FORM is set to "YES" transparent that a screen background color does not show through the text box. The text box transparency setting seems to be in reverse to normal logic.

    I am also finding that the TEXT boxes are not being shown "on screen" as set by the coordinates in the FORM properties settings or the Visi WYSIWYG. Some of the text box screens are being displayed randomly.

    Am I not understanding the proper use of Visi and programming?

    I have included a demo.
    Attached Files
    Last edited by Rob A; 29th December 2018, 02:05 AM.

    Leave a comment:


  • Vince_4D
    replied
    Hi,

    You'll only need to run gfx_Set(...) once if no changes on the BG color will be made.
    So, if you run gfx_Cls(), the screen will be cleared with the current BG color.

    Best regards,

    Leave a comment:


  • Rob A
    replied
    Thanks,
    That is helpful information.

    Does the gfx_Set command setting of the BG color only run the one time by the following gfx_Cls(); or does the BG get run on every Cls afterword untill the color gets changed?

    gfx_Set(BACKGROUND_COLOUR, NAVY); // color from the settings gfx_Cls();
    Last edited by Rob A; 28th December 2018, 10:49 PM.

    Leave a comment:


  • Vince_4D
    replied
    Hi,

    I have attached the sample project which shows the output you're trying to replicate. Below is the output of the project.

    Click image for larger version

Name:	IMG20181228101944.jpg
Views:	64
Size:	2.37 MB
ID:	66508


    The specific issue found was the incorrect output upon clicking the Paste Code of the Form with Bgtype set to Color.
    The generated output is:
    Code:
    media_SetAdd(iForm1H, iForm1L) ;      // point to the Form1 image
    media_Image(0, 0) ;            // show image
    instead of
    Code:
    gfx_Set(BACKGROUND_COLOUR, NAVY);  // color from the settings
    gfx_Cls();
    Click image for larger version

Name:	pasteCode.PNG
Views:	72
Size:	9.0 KB
ID:	66509

    ​​​​​​​

    The latter code generated should only be used if the Form's Bgtype is set to Image.

    So somehow you could still implement your project without an issue but still, we will address this issue soonest.

    Kindest regards,

    Leave a comment:


  • Rob A
    replied
    Thanks Vince_4D,

    Last time I tried running a text box (Black color) as "transparent" check box YES with the Navy BG color command I don't think the text box became the BG Navy color. But I will try it again.

    When do you think we can expect the next update on Workshop4, week, one month, two months? This is a hold up for me and I'm sure others as well.

    Leave a comment:


  • Vince_4D
    replied
    Hi,

    The issue will be fixed on the next release of Workshop4 and we thank you for pointing it out for us to address it.
    With regards to Transparency, yes it does work. Refer to the code below.
    Code:
    var navy := 0x0010;
    
    func main()
    
        print("Starting\n") ;
        while(!media_Init())
            putstr("Drive not mounted...");
            pause(200);
            gfx_Cls();
            pause(200);
        wend
    
        gfx_BGcolour(navy);
        gfx_Cls();
    
        // Statictext1 1.0 generated 28/12/2018 9:03:16 AM
        media_SetAdd(iStatictext1H, iStatictext1L) ;      // point to the Statictext1 image
        media_Image(20, 60) ;            // show image
    
        repeat
        forever
    endfunc
    Best regards,

    Leave a comment:


  • Rob A
    replied
    This code requires the gfx_Cls(); command. It would be nice to set the BG color when doing the actual screen layout...but I guess that's fubar for right now, correct?

    When can we expect to have that properties BG color function operational?

    ALSO, does the TRANSPARENT properties setting work for the Goldelox?




    Here is the portion of code:

    var navy := 0x0010;
    repeat

    gfx_BGcolour(navy);
    gfx_Cls();

    // Statictext1 1.0 generated 12/27/2018 8:43:47 AM
    media_SetAdd(iStatictext1H, iStatictext1L) ; // point to the Statictext1 image
    media_Image(16, 5) ; // show image

    pause(5000);

    forever
    Last edited by Rob A; 28th December 2018, 01:27 AM.

    Leave a comment:


  • Vince_4D
    replied
    Hi Rob,

    There is something wrong with the paste code function of the Form. We will fix this issue on the next update.
    But to change the background color, implement as follows:
    Code:
    func main()
    
        print("Starting\n") ;
        while(!media_Init())
            putstr("Drive not mounted...");
            pause(200);
            gfx_Cls();
            pause(200);
        wend
    
        gfx_Set(BACKGROUND_COLOUR, 0x0010);   // sets the BG colour
    
        gfx_Cls();
    
        repeat
            // do something
        forever
    
    endfunc
    Hope this will help.

    Best regards,

    Leave a comment:

Working...
X