Table Help

Discussion in 'Questions (Windows Mobile)' started by ftaylor74, Jul 15, 2009.

  1. ftaylor74

    ftaylor74 Member Licensed User

    Is their a programmatic way to de-select a row that has been previously selected from a table?

    Any help will be appreciated.
    Thanks!
     
  2. ftaylor74

    ftaylor74 Member Licensed User

    Never mind. Using SelectCell and setting the rowindex to 0 seems to work fine.
    Thanks
     
  3. ftaylor74

    ftaylor74 Member Licensed User

    Welll, SelectCell did not work. Any ideas? Thanks
     
  4. ghale

    ghale Active Member Licensed User

    I've noticed that calling SelectCell and setting as index 0, it works on PPC and on Windows it generates System.ArgumentException

    I'm wrong?
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Are you sure that the table wasn't empty on the desktop?
    I can't reproduce it.
     
  6. ghale

    ghale Active Member Licensed User

    Yes, I've tried on desktop with a filled table, and it fires the exception!

    Strange, very strange.
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Can you create and upload a small program that demonstrates this?
     
  8. ghale

    ghale Active Member Licensed User

    I've done some test and I've understood why I receive the exception.

    I've done this tiny example to let other users avoid this "issue", that is not a real issue.

    So,
    if the SelectCell is called and the form is not visible, it generates Exception.
    If the form is visible, the function is ok.

    For users: If you click on the button repeatly when the form is visible, the selected row is no more selected. It's necessary to give the focus on the table to select it. This happens only on Windows, not Windows Mobile.

    Question:
    how from code I can determine if form is visible?
    I have to use a boolean, because I've seen that in Form methods there is only Enabled, not Visible.
     
    Last edited: Aug 8, 2009
  9. Erel

    Erel Administrator Staff Member Licensed User

    You can check the visible property of any control which is always visible on the form.
    If the form is hidden then it will return false.
     
  10. ghale

    ghale Active Member Licensed User

    Hem, Where I can find the Visible property???
     
  11. klaus

    klaus Expert Licensed User

    All visualized controls have a Visible property.

    Simply
    If TexBox1.Visible = False then

    Best regards.
     
  12. ghale

    ghale Active Member Licensed User

    Hem yes, but the Form object?

    If I use Form.Visible I generate an exception!
     
  13. klaus

    klaus Expert Licensed User

    As Erel already wrote in his post, you can use any control on your form that normally is always visible.

    When the Form is hidden, the Visible properties of all Controls on that Form will return False.

    Best regards.
     
  14. ghale

    ghale Active Member Licensed User

    Ok, maybe now I'm a bit drunk, but If I use Formname.Visible property I receive an error.

    The example I attached WON'T work for me.

    Edit:
    So, if the one of the controls of the form returns False, the form is hidden.
    The only control that doesn't have the Visible Property, is Form!

    Ok, if this is the logic... but for me a .Visible property associated to the Form, is a better way to determine if the form is visible or not.

    Sorry for my "ignorance"
     
    Last edited: Aug 8, 2009
  15. klaus

    klaus Expert Licensed User

    As Erel said: a Form has no Visible parameter only the Controls on it.
    But when a Form is hidden, the Visible parameters of that form return False.

    Attached your Staus program modified that shows the behaviour.

    Best regards.
     
  16. ghale

    ghale Active Member Licensed User

    Ok, Klaus, maybe I've not explained my think correctly.

    I've understood this, I've expressed only my opinion about the less of .Visible property for Form object.

    Now I've explained correctly this?

    We are spending our time on this thread. It's my fault maybe, to not explain correctly in english what I mean.

    Sorry for this, then.
     
  17. klaus

    klaus Expert Licensed User

    Sorry for not understanding you correctly.

    You should have posted this subject in the Basic4ppc Wishlist Forum.

    Best regards.
     
  18. ghale

    ghale Active Member Licensed User

    I'm doing this now... :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice