Dynamic change in Caption of Textboxes on form

gulamdastagirgulamdastagir Member Posts: 411
i have a situation where i have 6 textboxes which have to take todays date and display the captions of previous six months.


i tried EVALUATE(txt,CALCDATE('CM-6M',TODAY)

where txt is the text variable

cant convert date to text ...

iam trying to set the captionclass property of the text box as

'1,5,,' +txt
Regards,

GD

Comments

  • gulamdastagirgulamdastagir Member Posts: 411
    txt:=FORMAT(DATE2DMY(CALCDATE('CM-6M',TODAY),2 ));

    gives me 7 for july but how to to show it as the caption for the textbox???
    Regards,

    GD
  • JutJut Member Posts: 72
    Did you try to set the CaptionClass-Property of your textbox to the following:
    '1,5,,txt'

    This should change you caption dynamically.

    Take a look at this thread:
    http://www.mibuso.com/forum/viewtopic.p ... ptionclass

    H hope this could help you!
  • gulamdastagirgulamdastagir Member Posts: 411
    '1,5,,'+txt


    txt value is "june 2007" but i get a blank caption #-o
    Regards,

    GD
  • JutJut Member Posts: 72
    mhh strange behavior...

    workaround: create a new text-variable e.g. called txtCaptionClass and set this txtCaptionClass to '1,5,,'+txt. Then use this new variable in the CaptionClass-Property. It seems that the String-Concatenation is not evaluated properly in the CaptionClass-Property.
  • gulamdastagirgulamdastagir Member Posts: 411
    iam supplying this value to the captionclass property using the txtCaptionClass which jut suggested however iam getting a blank caption ](*,)

    1,5,,Dec 2007 and i get blank caption
    Regards,

    GD
Sign In or Register to comment.