Announcement

Collapse
No announcement yet.

Changing Label Size without Decrease Resolution

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

  • Changing Label Size without Decrease Resolution

    I want to ask something. I am trying to use one of your products. I need a text that can change according to value that comes frome UART. The text must be at least "30" size but when i change width and height,resolution of label is decreasing. Is there any library for this? or an other thing to do ? thanks for help.

  • #2
    please specify the environment your running and the widget your using as well, we dont have any idea of the hardware or environment your using visi/designer/genie?

    Comment


    • #3
      for now i am working at uLCD-43PT, but i will change it with gen4-uLCD-43DCT-CLB, visi or designer doesnt matter but not genie.sorry for this.

      Comment


      • #4
        Your referring to the Strings object, correct?

        In the panel options of the widget, double click the "Strings" text field, and on the bottom left of the poppup, you'll need to change the font to get your own sized text. Put any text in the box to see the size of it while your adjusting until you get what you want. I tried out times new roman font at 33points and it's fine

        regards
        Tony

        Comment


        • #5
          PrintDisk(hstrings, Strings1StartH, Strings1StartL, Strings1Size, i) ;
          this code gives error and i cant find anything about this function in Internal 4DGL Functions

          Comment


          • #6
            remenia

            You must include the line ---> #inherit "printdisk.inc" so the compiler will not give an error. You can follow this simple code in VISI for displaying Messages:

            #platform "uLCD-35DT"


            // Program Skeleton 1.3 generated 4/11/2017 8:43:23 AM

            #inherit "4DGL_16bitColours.fnc"

            #inherit "VisualConst.inc"

            #inherit "printdisk4-11-2017Const.inc"

            #inherit "printdisk.inc"

            func main()
            var hstrings ; // Handle to access uSD strings, uncomment if required
            var hFont1 ; // Handle to access uSD fonts, uncomment if required and change n to font number
            // Uncomment the following if uSD images, fonts or strings used.

            putstr("Mounting...\n");
            if (!(file_Mount()))
            while(!(file_Mount()))
            putstr("Drive not mounted...");
            pause(200);
            gfx_Cls();
            pause(200);
            wend
            endif
            // gfx_TransparentColour(0x0020); // uncomment if transparency required
            // gfx_Transparency(ON); // uncomment if transparency required

            hFont1 := file_LoadImageControl("printdis.da1", "printdis.gc1", 1); // Open handle to access uSD fonts, uncomment if required and change n to font number dropping a and c if > 9
            hstrings := file_Open("printdis.txf", 'r') ; // Open handle to access uSD strings, uncomment if required
            hndl := file_LoadImageControl("printdis.dat", "printdis.gci", 1);



            // Strings1 1.1 generated 4/11/2017 8:44:54 AM
            txt_FontID(hFont1) ; // Font index correct at time of code generation
            txt_FGcolour(WHITE) ;
            txt_BGcolour(BLACK) ;
            gfx_MoveTo(40 , 48) ;
            PrintDisk(hstrings, Strings1StartH, Strings1StartL, Strings1Size, 0) ; // where i is Message 0 - Strings1Count-1


            repeat
            forever
            endfunc



            Comment


            • #7
              Click image for larger version

Name:	image_2161.png
Views:	49
Size:	257.5 KB
ID:	57231

              i am sorry but this is even worse. Am i doing something wrong ?

              Comment


              • #8
                Click image for larger version

Name:	PrintdiskCapture.PNG
Views:	82
Size:	152.4 KB
ID:	57237 ramenia,

                On the object inspector, click on Strings and click on the Ellipsis. then choose your font and Size. Compile and load. You must insert
                an uSD card to your PC using a card reader and after compilation, insert the uSD card to the 4D LCD. For the value of i for the PrintDisk, choose 0 (zero) for the First string.

                Comment


                • #9
                  I have a question regarding this "PrintDisk" and probably to the software development in general.
                  How would you have known to include the #inherit "printdisk.inc" line to solve this problem? I am looking everywhere for some documentation about the include files and how to use them. How do we know about the requirements and dependencies of some of these types of functions that are "pasted" into the code from Visi?

                  Please help!

                  thanks,

                  Brian

                  Comment


                  • #10
                    Since PrintDisk is listed in white, not green, and similary because it is not in the internal functions manual, it is (fairly) obviously a user function.

                    Since most ViSi examples are provided as source and you can see there is no function in the source, but there is a #inherit for a .inc of the same name, it stands to reason that this is required.

                    Also, if you started with the 'Keyboard' example, The comment in 'Background 3' says what was done.
                    Mark

                    Comment


                    • #11
                      Hi,

                      In continuation to this question, I have recently found this statement added by ViSi:

                      Code:
                      PrintDisk(hstrings, Strings1StartH, Strings1StartL, Strings1Size, i) ; // where i is Message 0 - Strings1Count-1
                      By Looking at this post, I figured that I should have "#inherit printdisk.inc". After doing that, the compilation step is giving error on "i"? What is the purpose of "i"? No documentation inside the file
                      "printdisk.inc"

                      Please help.

                      Thanks and best regards,
                      Vishal

                      Comment


                      • #12
                        vsapre,

                        The i variable in the printdisk user function is the string you will want to display.
                        This appnote will make things clearer.
                        ViSi Displaying Third Party Fonts FAT16:
                        --> http://www.4dsystems.com.au/appnote/4D-AN-00080/


                        Best regards,

                        Comment


                        • #13
                          Thanks Noel. Got it

                          Comment

                          Working...
                          X