Article ID 1032
Article Title Control labels remain visible after setting visible_state to false
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=1032
KBase Category Visual DataFlex
Date Created 02/02/2000
Last Edit Date 03/11/2008


Article Text
PROBLEM:
When I set a dbForm visible_state to false the label is still visible.

SOLUTION:
This is a work-around I used in my subclass:

Procedure set visible_state integer iState
   forward set visible_state to iState
   if (label_object(self)) ;
       set visible_state of (label_object(self)) to iState
End_Procedure

Or:

Class cMydbForm is a dbForm
    Procedure Set Visible_State Boolean bVisible
        Handle hoLabel
        
        Forward Set Visible_State to bVisible
        
        // Make the object (not) accepting the focus
        Set Enabled_State to bVisible
        
        Get Label_Object to hoLabel
        If (hoLabel > 0) Begin
            Set Visible_State of hoLabel to bVisible
        End
    End_Procedure
End_Class


Contributed By:
Magnus Bergh
email: magnusb@sbbs.se


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2024 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.