Forum Discussion

BrianAlford's avatar
BrianAlford
Occasional Contributor
8 years ago

properties missing from object inspector

Hi,

 

The object inspector and test complete are missing several properties from a text box on one of my forms. In the attached image I have a screenshot of object inspector with two controls, one that has all of the usual properties (txtStartDate) and one that is missing these properties (txtDateClosed). An error occurs when the program cannot find the Locked property of txtDateClosed.

 

The controls are both of type ThunderRT6TextBox. Both are on the same panel on the same form. txtStartDate has a NativeVBObject property and a category of properties called Visual Basic which txtDateClosed does not have.

 

I have checked in the source code and both controls are standard textboxes.

 

Does anyone have any idea why these properties are present on one text box and not the other?

 

Update:

1. The application is a legacy application written in VB6.

2. The problem is occurring with combo boxes as well.

3. The problem does not occur consistently - sometimes controls that normally have these properties available no longer do so.

4. The same version of the executable is being used. I have not recompiled the application.

8 Replies

  • Just a guess, I don't work with anything written using VB6 ....

     

    Could this be something to do with the control being enabled, or not, at the point you inspect it?

     

    Does the Closed Date box only enable once the Start Date box is populated? It may be doing something to the control to disable it in the meantime which is disabling/removing some of the properties. If you get sporadic instances where this happens on other controls, it may be that they are sometime trying to be used before they're fully enabled? If it is, you may need to build yourself some sort of little helper function which checks these types of controls are fully enabled before you use them.

     

    As I say, just a guess, but it reads like this type of problem ....

    • BrianAlford's avatar
      BrianAlford
      Occasional Contributor

      Hi,

       

      I appreciate the answer but I don't think this is the case. As you can see in the screenshot (4th property from the top) both of the example controls have enabled set to true.

       

      I would also be surprised if being enabled or not limited access to other properties. I could understand if I were trying to set the text value, but I am only trying to read the locked value. In fact, all of the controls I am having this issue with are enabled (and I also happen to know that in the cases I have looked at, they are unlocked).

       

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        Ah well. Was just a guess.

         

        Although, just because enabled is set to true, is no guarantee it is actually enabled. I have controls like that. They report they are enabled (and also sometimes visible) when they're not. It depends on the methods the devs have used to disable/hide something. In my experience, they can come up with all sorts of weird and wonderful ways of doing it! Just to confirm, if you try and use the control manually at the point you're inspecting it, it is definitely active and enabled yes?

         

        (Reason I'm persisting with this line is a "Closed" type textbox is often closed/hidden/disabled/locked until the "Start" field contains a valid value ... and they may have done this in some funky way which TC is not picking up .... it happens.)