Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Container gets click, not contained object - why? how to
Message
From
06/01/2003 15:46:39
 
 
To
06/01/2003 15:16:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00738522
Message ID:
00738538
Views:
16
>I have a container object on a form that has a grid and a command button group inside of it. I have no problem clicking in and modifying grid items, but my Command Button group doesn't get clicked.
>
>I turned on event tracking in the debugger to verify this. When I click on the command buttons, the event tracker returns that the container got clicked, but not the command button. I've seen something on this before, but I don't know where to look for how to fix it.

Not sure what might be causing it without knowing more about your code. Here's a simple example of the situation. If you have the debugout window open, and run it, you should see that the button's click fires. If it does, then you might try saving the existing form. Then, simplify the container in question until you narrow down the source of the problem. Anyway here's the example:
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.SHOW
RETURN


DEFINE CLASS form1 AS FORM



  ADD OBJECT container1 AS CONTAINER WITH ;
    TOP = 25, ;
    LEFT = 87, ;
    WIDTH = 200, ;
    HEIGHT = 200, ;
    NAME = "Container1"


  ADD OBJECT form1.container1.commandgroup1 AS COMMANDGROUP WITH ;
    BUTTONCOUNT = 2, ;
    VALUE = 1, ;
    HEIGHT = 66, ;
    LEFT = 53, ;
    TOP = 67, ;
    WIDTH = 94, ;
    NAME = "Commandgroup1", ;
    Command1.TOP = 5, ;
    Command1.LEFT = 5, ;
    Command1.HEIGHT = 27, ;
    Command1.WIDTH = 84, ;
    Command1.CAPTION = "Command1", ;
    Command1.NAME = "Command1", ;
    Command2.TOP = 34, ;
    Command2.LEFT = 5, ;
    Command2.HEIGHT = 27, ;
    Command2.WIDTH = 84, ;
    Command2.CAPTION = "Command2", ;
    Command2.NAME = "Command2"


  PROCEDURE container1.CLICK
    DEBUGOUT PROGRAM()
  ENDPROC


  PROCEDURE commandgroup1.CLICK
    DEBUGOUT PROGRAM()
  ENDPROC


  PROCEDURE commandgroup1.Command1.CLICK
    DEBUGOUT PROGRAM()
  ENDPROC


  PROCEDURE commandgroup1.Command2.CLICK
    DEBUGOUT PROGRAM()
  ENDPROC


ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform