Announcement

Collapse
No announcement yet.

Strange CONTROL SET TEXT occuring ??

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

  • Strange CONTROL SET TEXT occuring ??


    Strange CONTROL SET TEXT occurring.

    T1,T2,T3 ARE SINGLE VAR. , number are like 000.00

    Code:
     ----------------------------------
     Have some labels in a dialog
     CONTROL ADD LABEL,  hDlg, %LBL110, "00.00" ,  240, 660, 45, 20
     CONTROL ADD LABEL,  hDlg, %LBL111, "00.00" ,  390, 660, 45, 20
     CONTROL ADD LABEL,  hDlg, %LBL112, "00.00" ,  548, 660, 44, 20 
     -----------------------------------
    
     ------------------------------------------
     A SUB - SUB END
    
    ' CONTROL SET TEXT  hDlg, %LBL110, STR$(T1)                '<----- THIS WILL NOT DISPLAY
     CONTROL SET TEXT  hDlg, %LBL110, TRIM$(STR$(T1))    '<----- THIS WILL DISPLAY
     CONTROL SET TEXT  hDlg, %LBL111, STR$(T2)                 '<----- THIS WILL DISPLAY, DOES NOT NEED TRIM$
     CONTROL SET TEXT  hDlg, %LBL112, STR$(T3)                 '<----- THIS WILL DISPLAY, DOES NOT NEED TRIM$
     ------------------------------------------

    Why would one variable need TRIM$ AND NOT THE OTHERS
    Anybody ever experience something like this?
    Robert

  • #2
    If I do this T1 still not displaying
    CONTROL SET TEXT hDlg, %LBL110, STR$(T2)
    ' CONTROL SET TEXT hDlg, %LBL110, TRIM$(STR$(T1))
    CONTROL SET TEXT hDlg, %LBL111, STR$(T1)
    Robert

    Comment


    • #3
      What are the values of T1,T2 and T3?

      Does this happen for different values of T1?

      Comment


      • #4
        Hi Robert,
        Make your labels wide enough to display the values. That change made it work for me.

        Comment


        • #5
          Making label value 60 fixed it. Many times in past on some other programs saw some text display but cutoff when label length was to short..
          This time did not see that. Guess with text it would do that but not with numbers.
          Thanks everyone for you help and comments.
          Robert

          Comment

          Working...
          X