in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Conditionally set BorderStyle property at run time

Last post 12-26-2007 7:47 AM by C1_GregL. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-23-2007 1:10 PM

    Conditionally set BorderStyle property at run time

    I would like to conditionally set (turn on) the border around a field at run time. 

    For example:  If FieldA > FieldB then FieldA.BorderStyle = Solid

    OK, syntactically it isn't right, but you get the idea.

    How do I do this?

    I tried putting an IF statement in the Detail OnPrint event, but it doesn't seem to work.  Maybe I just don't know the correct syntax.

    Thanx

    Tom

    Filed under:
  • 12-26-2007 7:47 AM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 516

    Re: Conditionally set BorderStyle property at run time

    In the detail's "OnFormat" script event you can set this with vbscript like

    If UnitsInStock < UnitsOnOrder Then
     
    ProductNameCtl.BorderStyle = "Solid"
    Else
     
    ProductNameCtl.BorderStyle = "Transparent"
    Endif

    Regards,
    Greg

    Filed under: ,
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.