Results 1 to 7 of 7
  1. #1
    Kratos321's Avatar
    Kratos321 is offline Member
    Join Date
    May 2011
    Posts
    31
    Rep Power
    0

    Default Tic Tac Toe help?

    The problem is that when I draw the second X or O, the previous one disappears. Any help?

    thanks in advance.
    Last edited by Kratos321; 05-15-2012 at 03:39 AM.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Tic Tac Toe help?

    A component can only be in one container.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Kratos321's Avatar
    Kratos321 is offline Member
    Join Date
    May 2011
    Posts
    31
    Rep Power
    0

    Default Re: Tic Tac Toe help?

    So, should I make separate panels for each square on the grid and have several if statements? Is that actually the best way?

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Tic Tac Toe help?

    Not sure what you are talking about.
    How does that relate to adding one component to more than one container?

    Change the code so each X & O component is only added to one container.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    Kratos321's Avatar
    Kratos321 is offline Member
    Join Date
    May 2011
    Posts
    31
    Rep Power
    0

    Default Re: Tic Tac Toe help?

    So in context, that means to add each X and O label to its own Panel (container) right? In which case multiple panels must be created? Because now, I only have the "clickedPanel".

    or did I misinterpret what you're saying....

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Tic Tac Toe help?

    You've gone the wrong way. A label can only be added to one panel. If you have 100 panels, the label can only be in one of them.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    Kratos321's Avatar
    Kratos321 is offline Member
    Join Date
    May 2011
    Posts
    31
    Rep Power
    0

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •