Click event on textbox inside a usercontrol WPF

Hello,
I'am a beginner in WPF and then i need your help!
I try to make a usercontrol which contains a textbox. I wish I could handle the click on the texbox to eg display a popup. So I add a property ClickCommand (which would be an onclick) because it does not exist on the textbox and then to be able to bind on the
event, so I used the DependencyProperty. But when I click on the textbox, no callback on the command binded. What is wrong?
Xaml part of the textbox inside my usercontrol
<TextBox x:Name="Test" Cursor="{Binding FieldCursor}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<prism:InvokeCommandAction Command="{Binding ClickCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBox>
Binding part to manage the DependencyProperty
public static readonly DependencyProperty ClickCommandProperty = DependencyProperty.Register("ClickCommand",
typeof(DelegateCommand<object>),
typeof(VariableControl),
new FrameworkPropertyMetadata((DelegateCommand<object>)null),
new ValidateValueCallback(IsValidClickCommand));
public DelegateCommand<object> ClickCommand
get { return (DelegateCommand<object>)this.GetValue(ClickCommandProperty); }
set { this.SetValue(ClickCommandProperty, value); }
public static bool IsValidClickCommand(object value)
DelegateCommand<object> v = (DelegateCommand<object>)value;
return true;

The ClickCommand should be a property of the DataContext of the TextBox for the binding to work. If you define the dependency property in the code-behind of the UserControl class, you need to set the DataContext of the TextBox to the user control:
public partial class VariableControl : UserControl
public VariableControl()
InitializeComponent();
Test.DataContext = this;
public static readonly DependencyProperty ClickCommandProperty = DependencyProperty.Register("ClickCommand",
typeof(DelegateCommand<object>),
typeof(VariableControl),
new FrameworkPropertyMetadata((DelegateCommand<object>)null),
new ValidateValueCallback(IsValidClickCommand));
public DelegateCommand<object> ClickCommand
get { return (DelegateCommand<object>)this.GetValue(ClickCommandProperty); }
set { this.SetValue(ClickCommandProperty, value); }
public static bool IsValidClickCommand(object value)
DelegateCommand<object> v = (DelegateCommand<object>)value;
return true;
Or in the XAML:
<TextBox x:Name="Test" Cursor="{Binding FieldCursor}" DataContext="{Binding Path=., RelativeSource={RelativeSource AncestorType=UserControl}}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<prism:InvokeCommandAction Command="{Binding ClickCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBox>
Hope that helps.
Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please only ask one question per thread.

Similar Messages

  • Click event (activate?) on images inside a GalleryView

    Hi,
    i tried few things in iAd Producer but now what i need to do is "go to page myPage" after taping/clicking on one of the images contained by a GalleryView.
    So i tried to handle this using the Activate event of my image layer, but the problem is that event is more like a didTouchDown event followed by a didTouchUpInside event than a true click event...
    Sorry if i'm not clear enough, what i mean is that if i touch the image then drag the GalleryView then release my touch from the image : the Activate event will be triggered... but what  i wanted to do was just drag the GalleryView.
    Does anyone know an alternative event that will be triggered only if the drag event is not triggered ?
    (I'm a developer, i can write some JS code if needed.)
    Thanks !

    Hi,
    You must be doing diffently than I am.  My gallery appears to be doing what you're looking for; swipe will change the gallery view (previous/next cell) and tap will activate my JS code.
    I have the gallery view with images on an iPhoen project.  The images in the 1st and 2nd cell have the onviewactivate event.  I just changed my image in my 2rd cell to got to page action.  Both behaves as expected on my iPod touch.
    If we can identify how you're doing differently, maybe we can help you.
    -Takayasu

  • WPF Panorama Control Drag firing a click event on inner tiles.

    Hi all,
    I'm using the MahApps Metro Panorama control.
    I'm encountering a little problem when panning with the mouse, whereby it activates the click event on the contained Tiles. I obviously wish to be able to click on any given Tile, but not whilst the Panorama control is panning.
    Not sure if there's an easy way to determine this by checking the time between MouseDown and MouseUp, or checking the mouse location between MouseDown and MouseUp? Is there a simpler way to tell if the control IsPanning or something?
    Regards,
    Jib

    Hi all,
    I'm using the MahApps Metro
    Panorama control.
    I'm encountering a little problem when panning with the mouse, whereby it activates the click event on the contained Tiles. I obviously wish to be able to click on any given Tile, but not whilst the Panorama control is panning.
    Not sure if there's an easy way to determine this by checking the time between MouseDown and MouseUp, or checking the mouse location between MouseDown and MouseUp? Is there a simpler way to tell if the control IsPanning or something?
    Regards,
    Jib
    Since I am so fresh in the programming are, I never heard about panorama control, I googled it and find it to be a very interesting control. Anyway, I don't figure out what exactly doese
    panorama tile do. Hope your question be fixed soon.

  • How to handle double click event in a text control

    Hi,
       Will u please send me information on handling double click events inside text control and also about locking and unlocking of DB tables for updation.
    Regards,
    Praba.

    Hi Prabhavathi,
    Here is how you handle double click events in Textedit control.
    1)Create a custom control in screen (say TEXT_CONTROL)
    2)In main program,
    a) Declarations:
    data: obj type ref to cl_gui_custiom_control.
          text type ref to cl_gui_textedit.
    b) Create the instance of custom container
    c) Create the instance of textedit control.
    3)Now to handle double click events , create a local class as follows.
    class shail_event definition.
    public section.
    methods:
    handle_doubleclick for event dblclick of cl_gui_textedit .
    endclass.
    class shail_event implementation.
    method handle_doubleclick .
    here do the coding for handling the double click.
    endmethod.
    endclass.
    4) Create an instance of the handler class(ie.ZSHAIL_EVENT).Let it be named hand.
    5) Define varibles for event.
    DATA: i_events TYPE cntl_simple_events,
          wa_events TYPE cntl_simple_event.
    SET HANDLER hand->handle_doubleclick for text.
    wa_events-eventid = cl_gui_textedit=>event_double_click.
    wa_events-appl_event = 'X'. "This is an application event
    APPEND wa_events TO i_events.
    6)
        CALL METHOD texte->set_registered_events
          EXPORTING
            events                    = i_events
          EXCEPTIONS
            cntl_error                = 1
            cntl_system_error         = 2
            illegal_event_combination = 3
            OTHERS                    = 4.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    These are the basic steps needed for handling events in Textedit control.You can go to SE24 and type CL_GUI_TEXTEDIT to find the associated events of the class.
    If you want the program, kindly send your mail-id so that I can mail it to you.
    Regards,
    Sylendra.

  • Image Click Event in html text

    Is there a way to attach event with the image inside html
    text in TextArea control. Just like we can attach text event with
    link tag?
    One possible solution is to enclose the image in <A>
    tag making it a link and setting its href to generate text event. I
    have already tried this and it works fine. But is there any other
    way to do that.
    Thanks

    Hi Prabhavathi,
    Here is how you handle double click events in Textedit control.
    1)Create a custom control in screen (say TEXT_CONTROL)
    2)In main program,
    a) Declarations:
    data: obj type ref to cl_gui_custiom_control.
          text type ref to cl_gui_textedit.
    b) Create the instance of custom container
    c) Create the instance of textedit control.
    3)Now to handle double click events , create a local class as follows.
    class shail_event definition.
    public section.
    methods:
    handle_doubleclick for event dblclick of cl_gui_textedit .
    endclass.
    class shail_event implementation.
    method handle_doubleclick .
    here do the coding for handling the double click.
    endmethod.
    endclass.
    4) Create an instance of the handler class(ie.ZSHAIL_EVENT).Let it be named hand.
    5) Define varibles for event.
    DATA: i_events TYPE cntl_simple_events,
          wa_events TYPE cntl_simple_event.
    SET HANDLER hand->handle_doubleclick for text.
    wa_events-eventid = cl_gui_textedit=>event_double_click.
    wa_events-appl_event = 'X'. "This is an application event
    APPEND wa_events TO i_events.
    6)
        CALL METHOD texte->set_registered_events
          EXPORTING
            events                    = i_events
          EXCEPTIONS
            cntl_error                = 1
            cntl_system_error         = 2
            illegal_event_combination = 3
            OTHERS                    = 4.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    These are the basic steps needed for handling events in Textedit control.You can go to SE24 and type CL_GUI_TEXTEDIT to find the associated events of the class.
    If you want the program, kindly send your mail-id so that I can mail it to you.
    Regards,
    Sylendra.

  • Image button click event not triggered in IE11

    I have an Image button, on its click event textbox is displayed, but it is not working in IE 11. It is working fine on chrome

    Please post questions related to ASP.NET in the ASP.NET forums (http://forums.asp.net).

  • Activating Click event on Item Renderer only

    Hey. I'm working on a s:list and a click event problem. I have everything working just fine on the component and linking, but as you probably guessed, the event cues when anything on the s:list is clicked, including the scroll bar or empty space.
    Is there a quick fix to make the event only cue when an Item Renderer is clicked inside the list? Help would be much appreciated, I've been trying to solve this problem for a while.
    Thanks!
    RKaster

    Hi RKaster,
    do you need the reference to the item renderer by force or could you immagine a different approach? If you could work around that you could use the change event instead of the click event. The change event gets fired whenever the selection of items in the list change. A click on an item renderer of course will change the selection if the underlying item isn't already selected.
    If you can't work around the need of an item renderer reference you should experiment with the mouseChildren property of the List component (inherited from DisplayObjectContainer, see http://bit.ly/dhqCFS). IMHO of course
    Regards,
    Thilo

  • Click event on Autosuggest Listbox. How to capture it ?

    Hello.
    I'm trying without much success to understand how to capture
    the click event on the listbox associated with the Spry Autosuggest
    Widget.
    At this address:
    http://labs.adobe.com/technologies/spry/samples/autosuggest/SuggestSample.html
    it is described how to use the widget. For an istance when
    you type 'Ado' in the first textbox of the page, the listbox (or
    what looks like a listbox) appears with all the possible Adobe
    products beginning with 'Ado'. As the user clicks on a product,
    let's say 'Adobe Acrobat Professional', its description is passed
    to the textbox.
    Fact is, I would like to capture the event of the clicking on
    the Listbox item. Is there a way to obtain that ?
    I would really like to be able to call a JS function when an
    item is selected there...
    I would appreciate any help to solve the problem.
    Regards,
    Newcomsas

    Hi, adding an onClick event handler ist quite easy. my code
    looks like this:
    <div id="VKundenAS" spry:region="dsKunden">
    <div onclick="updateVKundenUUID('{f_uuid}');"
    spry:repeat="dsKunden"
    spry:suggest="{f_name}">{f_name}</div>
    </div>
    Just add the event handler to the corresponding list element
    (here it is a DIV-tag).
    Unfortunately this only works with mouse interaction
    (onClick), if you navigate with the keyboard, no custom JS is
    called. So you have to disable keyboard selection on the
    autosuggest widget, in order to make sure the JS gets called.
    Best wishes,
    Nils

  • How to raise Panel's click event?

    I have a button placed inside a panel and its dock property is set to FILL. When user clicks on that button, I want the panel's click event also to be raised. I tried setting panel capture property to TRUE, but the panel's click event is not rising. Can
    anyone please help me out with this problem?
    Thank you in advance

    Hi,
     You can call the Panels Click event sub like you would any other sub. I am not sure why you can`t just place the code from the Panel`s Click event sub into the Buttons Click event sub which would do the same thing but, if you really need to do it this
    way then here is an example.
    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Panel1_Click(sender, e)
    End Sub
    Private Sub Panel1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel1.Click
    MessageBox.Show("Panel Clicked")
    End Sub
    End Class
    After looking through some of your questions, maybe you want something like this so that the parent Panel of the button actually is the sender of the Panel`s click event.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim btn As Button = DirectCast(sender, Button) 'get the button from the "sender"
    Panel1_Click(btn.Parent, e) 'raise the Panel click event with the Parent panel of the button as the "sender"
    End Sub
    Private Sub Panel1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel1.Click
    Dim pnl As Panel = DirectCast(sender, Panel) 'get the panel from the "sender"
    MessageBox.Show(pnl.Name & " Clicked")
    End Sub
    If you say it can`t be done then i`ll try it

  • How to bind a click event to a button that is embedded in another symbol

    All-
    I'm sure this is easy but ya know...
    So I have a menu on the main stage that has 18 buttons.  These buttons are nested inside of a symbol called MC_MENU_CONTAINER.  I'm animating this symbol with show/hide buttons on the main stage, which works great.  What Id like is to bind a click event to these nested buttons from the main stage.  I was able to   access the nested buttons with this code sym.getComposition().getStage().getSymbol("MC_MENU_CONTAINER").$("BTN_INTRO").hide();  This hides the first button but when i try to attatch a click event to "BTN_INTRO" it doesn't work.  I have the code stored on the stage using compositionReady.
    Any ideas?
    thx

    For simple alerts, console.log, and strings, single or double quotes doesn't matter.
    It does matter when you start dealing with quotes in strings. If you wanted to alert: Say "Hello", you could do it either way:
    alert('Say "Hello"');
    alert("Say 'Hello'");
    Since Edge is built on javascript, it's really important to have a good handle on javascript and jQuery, in order to utilize the tool to it's full potential.
    javascript:
    https://developer.mozilla.org/en-US/docs/JavaScript/Getting_Started
    http://elegantcode.com/2010/10/22/basic-javascript-part-1-functions/
    jQuery:
    http://webdesignerwall.com/tutorials/jquery-tutorials-for-designers
    http://docs.jquery.com/Tutorials

  • Issues with click events and nested ellipse objects

    I thought by now, I'd have this, but after a number of attempts, nothing is working.
    Got a series of circular objects nested inside drawn using the ellipse tool in An of a sumbol called 'box' Click event in each symbol. When clicked, symbol should either hide or change CSS attributes or anything really. Tried a bunch of examples and there's four variations in my .zip file. None of them work and some are ones I've used previously. So I don't get why this isn't working and what the correct code should be. Tried getSymbol, Stage and Composition. None of them worked. So what does?

    Hi, ladobeugm-
    Try:
    sym.$("c1").hide();
    This is the same as:
    sym.getSymbol("c1").getSymbolElement().hide();
    sym.getStage().getComposition().getSymbol("box").$("c1").hide();
    sym.getStage().getComposition().getSymbol("box").getSymbol("c1").getSymbolElement().hide() ;
    Hope that helps!
    -Elaine

  • Error with No Message on Button Click Event

    Hi,
    I am getting a framework error on button click event.
    I have a page in which shuttle component is there,on click of the commit button the page traversed to main jsp page there i am getting error like ERROR and only '-'.
    In application module java file i have written the code for the shuttle component which creates the new row and set the values.

    Hi Frank. Thanks for the answer. Kindly check the code for shuttle component below. This is written in the Application Module (..ServicesImpl.java)
    public void multipleShuttle(List productIds,String reqRefNumber,Date orderDate,String hoSectionCd)
    System.out.println("Its entering into the test method");
    System.out.println("Inside updateSkillsForCurrentStaff method");
    System.out.println("reqRefNumber:"+reqRefNumber);
    System.out.println("orderDate:"+orderDate);
    System.out.println("hoSectionCd:"+hoSectionCd);
    if (productIds != null && productIds.size() > 0)
    List<Number> copyOfProductIds = (List<Number>)Utils.cloneList(productIds);
    //List copyOfProductIdsNames=Utils.cloneList(productIds);
    System.out.println("list values "+copyOfProductIds);;
    //System.out.println("list values "+copyOfProductIdsNames);;
    ViewObject skills = getMsMsOrderHdrUO2();
    RowSetIterator rsi = skills.createRowSetIterator(null);
    // remove any rows for the current user that aren't in the list of product keys
    while (rsi.hasNext())
    Row r = rsi.next();
    Number productId = (Number)r.getAttribute("MsDepotCd");
    System.out.println("depot from row setter "+productId);
    // if the existing row is in the list, we're ok, so remove from list.
    if (copyOfProductIds.contains(productId))
    copyOfProductIds.remove(productId);
    // if the existing row is in not list, remove it.
    else {
    r.remove();
    rsi.closeRowSetIterator();
    // at this point, we need to add new rows for the keys that are left
    for (Number productIdToAdd: copyOfProductIds)
    Row newRow = skills.createRow();
    skills.insertRow(newRow);
    try
    System.out.println("productIdToAdd"+productIdToAdd);
    System.out.println("inside attributes setter try method");
    //AS PER THE NEW REQUIREMENT ORDER STAUTS WIL BE 'DRAFT' AND ON APPROVAL BY JGM THEN IT WILL BE 'APPROVED'
    newRow.setAttribute("OrderStatus","DRAFT");
    System.out.println("Depot Code set is"+newRow.getAttribute("DepotCd"));
    if(productIdToAdd.equals("0"))
    System.out.println("inside the HO method to set section");
    newRow.setAttribute("HoSections",hoSectionCd);
    System.out.println("After setting the values");
    catch(Exception e)
    System.out.println("Exception Caught"+e);
    getDBTransaction().commit();
    orderDetailInsertProcedure(reqRefNumber);
    }

  • Opening New Browser window for click event on an image

    hi all,
    I want someone to help me out solving the problem of opening
    a new browser window on the mouse click event of an image or a
    button etc.... The new window would contain the datagrid details
    from the main window, but in an expanded form. If at all there is a
    solution, I even want to know whether there is anyway for sizing
    the poped up window,because I dont want the new poped up window to
    cover the entire screen.
    For getting better idea of my problem, the best example I
    could give is the popup window that appears when we click on the
    preview button while posting the message to the forum.
    Someone please do help me out in this regard.
    Thanks,
    amar.

    I'd definitely try to use a Flex popup... but the
    flash.net.navigateToURL method is a simple way to open a popup
    window in a new browser. You can pass any data needed by the new
    page using the URLRequest and/or URLVariables. The URL you navigate
    to could, of course, be another Flex application if necessary. I
    use this only when I need to open a popup window on another site,
    or an HTML formatter report or something similar.
    Concerning yourself with the size of the popup window may be
    a bad design choice also. I, for example, have my browser
    configured to open all popups in a new tab regardless of sizing
    constraints imposed by the designer. If it is absolutely necessary
    for you to have control over the size of your popup window, you
    should follow the advice given by others and use a Flex
    popup.

  • Radio button's click event to script both ".presence" and ".mandatory" -- Need help !

    Hi all,
    I've adopted the script stated in HightlightOneRequiredField.pdf so that the print button in my form can detect and prevent null field before pop up the print dialog. It works fine.
    In my form, I've created a mandatory 2-radio buttons group with click event script written, using ".presence", in each button. When user clicks:
    Button A: make subform A visible and subform B invisible;
    Button B: make subform A invisible and subform B visible.
    Apart from the visibility of the subforms, what I want more is to add a .mandatory script (together with the click event) in the buttons to turn some fields' mandatory in the subforms on and off so that when user clicks:
    Button A: will also turn some fields' value type in subform A to be "User
    Entered-Required", whereas some of that in subform B to be "-
    optional";
    Button B: will turn the subform B's fields to "-Required" and subform A's
    fields back to "-optional"
    However no luck with me. When I press the print button after any of the radio buttons checked, the print dialog still show up even the subforms' fields are null as if those fields' value type always remain "-optional"
    I wonder if this problem is caused by Chinese binding name ? The script written in the radio button B is:
    FormA.presence = "invisible";
    FormB.presence = "visible";
    if (B1.mandatory = "disabled")
    B1.mandatory = "error";
    if (B2.mandatory = "disabled")
    B2.mandatory = "error";
    if (B3.mandatory = "disabled")
    B3.mandatory = "error";
    if (A1.mandatory = "error")
    A1.mandatory = "disabled";
    if (A2.mandatory = "error")
    A2.mandatory = "disabled";
    if (A3.mandatory = "error")
    A3.mandatory = "disabled";
    B1, B2 and B3 represent the Chinese fields' binding name in FormB
    A1, A2 and A3 represent the Chinese fields' binding name in FormA
    (The script in radio button A is reversed in this way.)
    Have I done something wrong in the above (click event) javascript?
    Please help.
    Thanks in advance.
    Alex

    Hi all,
    I've adopted the script stated in HightlightOneRequiredField.pdf so that the print button in my form can detect and prevent null field before pop up the print dialog. It works fine.
    In my form, I've created a mandatory 2-radio buttons group with click event script written, using ".presence", in each button. When user clicks:
    Button A: make subform A visible and subform B invisible;
    Button B: make subform A invisible and subform B visible.
    Apart from the visibility of the subforms, what I want more is to add a .mandatory script (together with the click event) in the buttons to turn some fields' mandatory in the subforms on and off so that when user clicks:
    Button A: will also turn some fields' value type in subform A to be "User
    Entered-Required", whereas some of that in subform B to be "-
    optional";
    Button B: will turn the subform B's fields to "-Required" and subform A's
    fields back to "-optional"
    However no luck with me. When I press the print button after any of the radio buttons checked, the print dialog still show up even the subforms' fields are null as if those fields' value type always remain "-optional"
    I wonder if this problem is caused by Chinese binding name ? The script written in the radio button B is:
    FormA.presence = "invisible";
    FormB.presence = "visible";
    if (B1.mandatory = "disabled")
    B1.mandatory = "error";
    if (B2.mandatory = "disabled")
    B2.mandatory = "error";
    if (B3.mandatory = "disabled")
    B3.mandatory = "error";
    if (A1.mandatory = "error")
    A1.mandatory = "disabled";
    if (A2.mandatory = "error")
    A2.mandatory = "disabled";
    if (A3.mandatory = "error")
    A3.mandatory = "disabled";
    B1, B2 and B3 represent the Chinese fields' binding name in FormB
    A1, A2 and A3 represent the Chinese fields' binding name in FormA
    (The script in radio button A is reversed in this way.)
    Have I done something wrong in the above (click event) javascript?
    Please help.
    Thanks in advance.
    Alex

  • How can I (neatly) control mouse click events in a multi-dimensional array?

    Hello everyone!
         I have a question regarding the use of mouse clicks events in a multi-dimensional array (or a "2D" array as we refer to them in Java and C++).
    Background
         I have an array of objects each with a corresponding mouse click event. Each object is stored at a location ranging from [0][0] to [5][8] (hence a 9 x 6 grid) and has the specific column and row number associated with it as well (i.e. tile [2][4] has a row number of 2 and a column number of 4, even though it is on the third row, fifth column). Upon each mouse click, the tile that is selected is stored in a temporary array. The array is cleared if a tile is clicked that does not share a column or row value equal to, minus or plus 1 with the currently targeted tile (i.e. clicking tile [1][1] will clear the array if there aren't any tiles stored that have the row/column number
    [0][0], [0][1], [0][2],
    [1][0], [1][1], [1][2],
    [2][0], [2][1], [2][2]
    or any contiguous column/row with another tile stored in the array, meaning that the newly clicked tile only needs to be sharing a border with one of the tiles in the temp array but not necessarily with the last tile stored).
    Question
         What is a clean, tidy way of programming this in AS3? Here are a couple portions of my code (although the mouse click event isn't finished/working correctly):
      public function tileClick(e:MouseEvent):void
       var tile:Object = e.currentTarget;
       tileSelect.push(uint(tile.currentFrameLabel));
       selectArr.push(tile);
       if (tile.select.visible == false)
        tile.select.visible = true;
       else
        tile.select.visible = false;
       for (var i:uint = 0; i < selectArr.length; i++)
        if ((tile.rowN == selectArr[i].rowN - 1) ||
         (tile.rowN == selectArr[i].rowN) ||
         (tile.rowN == selectArr[i].rowN + 1))
         if ((tile.colN == selectArr[i].colN - 1) ||
         (tile.colN == selectArr[i].colN) ||
         (tile.colN == selectArr[i].colN + 1))
          trace("jackpot!" + i);
        else
         for (var ii:uint = 0; ii < 1; ii++)
          for (var iii:uint = 0; iii < selectArr.length; iii++)
           selectArr[iii].select.visible = false;
          selectArr = [];
          trace("Err!");

    Andrei1,
         So are you saying that if I, rather than assigning a uint to the column and row number for each tile, just assigned a string to each one in the form "#_#" then I could actually just assign the "adjacent" array directly to it instead of using a generic object to hold those values? In this case, my click event would simply check the indexes, one at a time, of all tiles currently stored in my "selectArr" array against the column/row string in the currently selected tile. Am I correct so far? If I am then let's say that "selectArr" is currently holding five tile coordinates (the user has clicked on five adjacent tiles thus far) and a sixth one is being evaluated now:
    Current "selectArr" values:
           1_0
           1_1, 2_1, 3_1
                  2_2
    New tile clicked:
           1_0
           1_1, 2_1, 3_1
                  2_2
                  2_3
    Coordinate search:
           1_-1
    0_0, 1_0, 2_0, 3_0
    0_1, 1_1, 2_1, 3_1, 4_1
           1_2, 2_2, 3_2
                  2_3
         Essentially what is happening here is that the new tile is checking all four coordinates/indexes belonging to each of the five tiles stored in the "selectArr" array as it tries to find a match for one of its own (which it does for the tile at coordinate 2_2). Thus the new tile at coordinate 2_3 would be marked as valid and added to the "selectArr" array as we wait for the next tile to be clicked and validated. Is this correct?

Maybe you are looking for

  • How to know the channels sequence in PI...

    Hi, My scenario is ECC --> PI --> legacy The SLD, ESR, IR etc was configured by another person. I am debugging an issue and I want to know in which order all the communication channels are processed. I see that a report program in ECC fills data in t

  • Can not drag and drop or copy and paste

    It is as simmple as the title. I can not drag and drop icons or text or folders. Nothing. As for cut, copy, and paste they do not work either. I am trying to back up my files so I can do a clean install of snow leopard. I have leopard currently.

  • Problem in printing me2l report

    Hi Experts, When I try to take the printout of the report me2l. I get message that system cannot print the last 8 columns of the report. Thanks, Kiran

  • GOS view attachment: Attachment of all users.

    Hello colleagues, Proud to say that I was able to implement attachment service from GOS by using the information I got entirely from this forum !  Kudos to all experts who have posted such excellent learning content. I have only one remaining issue f

  • Itunes issues with windows 8... laggy?

    anyone one else having abit a of laggy issue with playing music on windows 8? i just upgraded to windows 8 con. preview, and its great and fast. i use to have windows 7 and itunes never skipped a beat. i have a sony viao with an upgraded ram and ssd