Announcement

Collapse
No announcement yet.

Visi Background Color

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

  • Visi Background Color

    When I create text on a Form I can size the text box and center it well. I have been using black for the background in the text field and the screen background as well (default). I now want a different color but the screen background does not seem to flood the entire screen viewing area. I am choosing the Form/form color to what I want. There is not a simple background screen to add, only a gradient which is a large code add-in.

    Is that not the correct place to choose it?
    What am I not doing correctly?

    Thanks
    Last edited by Rob A; 26th December 2018, 01:36 AM.

  • #2
    Hello Rob A,

    To modify the background color of the current form, choose the Form you want to modify under the Object Inspector.
    Then, you may choose the background type whether Image or Color.

    I have placed a screenshot below as a guide.
    Click image for larger version

Name:	BGcolor.JPG
Views:	42
Size:	50.2 KB
ID:	66486

    I hope the above helps.
    Please feel free to contact me if you need any further assistance.

    Best Regards,
    Last edited by Danica; 26th December 2018, 11:31 AM.
    Danica

    Comment


    • #3
      Hi, your answer is appreciated but fails to address the issue. The problem is not that I cannot choose a form background color, its that the background color does not FILL THE ENTIRE SCREEN VIEWING AREA, 128 X 128.
      Thank you
      Last edited by Rob A; 26th December 2018, 12:46 PM.

      Comment


      • #4
        Hello,

        Please kindly send a photo showing the issue with your display.
        Thank you.

        Best Regards,
        Danica

        Comment


        • #5
          Click image for larger version

Name:	Form1 background error.JPG
Views:	34
Size:	201.9 KB
ID:	66490

          Hi,
          Here is a screenshot of just setting the form1 color to a dark green to try and get a full screen background. However the Form1 code kicks back this error and I'm not sure what the cause is. Any help in being able to easily choose and implement BG colors is appreciated.

          Comment


          • #6
            I am not getting the expected results when trying to place a BG color (Navy Blue) or in this case a square as a BG. The text area even set to transparent still shows a black text box. or even when I have a text box set to Navy Blue it still shows black. Can you please show me what is required to get the background color (in FULL 128 x 128 screen) of my choice.

            I also cannot find in Visi the uSD tester tool.
            "Click uSD Tester to test the uSD card mounted on the display. Before clicking this button, make sure that the uSD card is mounted on the display module."

            I am also not seeing "Download completed" when doing a SHIFT F9 function. Sometimes to get this thing to work I need to partition and format the card with the RMPet tool. Workshop4 ver-4.5.0.15

            Help please.


            Click image for larger versionName:	Capture1.JPGViews:	1Size:	166.0 KBID:	66494



            Click image for larger version  Name:	Capture2.JPG Views:	1 Size:	177.0 KB ID:	66495

            Solid BG PATTERN is chosen for this test.

            Click image for larger version  Name:	20181226_174930.jpg Views:	1 Size:	890.7 KB ID:	66493


            Last edited by Rob A; 27th December 2018, 08:16 AM.

            Comment


            • #7
              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,
              Vince_4D

              Comment


              • #8
                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.

                Comment


                • ESPsupport
                  ESPsupport commented
                  Editing a comment
                  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

              • #9
                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,
                Vince_4D

                Comment


                • #10
                  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.

                  Comment


                  • #11
                    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:	33
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:	35
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,
                    Vince_4D

                    Comment


                    • #12
                      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.

                      Comment


                      • #13
                        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,
                        Vince_4D

                        Comment


                        • #14
                          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.

                          Comment


                          • #15
                            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.

                            Comment

                            Working...
                            X