Very quick treeview question

Discussion in 'Questions (Windows Mobile)' started by yildi, Feb 28, 2008.

  1. yildi

    yildi Member Licensed User

    I am trying to use a TreeView object called tree in my application.
    I am trying to set its color by typing
    tree.Color = 0,51,51
    (I have followed the Color example of the general B4PPC help file since there is no example for this property of the TreeView)

    But the compiler gives me an error telling that it needs a semicolon (;):
    Error CS1002: ; expected

    How can I set this property?

    Same question for tree.FontColor

    I am sure that some of the gurus know the answer to this (probably) stupid question :)

    Thanks in advance

  2. agraham

    agraham Expert Licensed User

    That is old superceded syntax in the help file.

    tree.Color =RGB(0,51,51)
  3. Erel

    Erel Administrator Staff Member Licensed User

    This syntax only works with the built-in controls.
    As agraham wrote, you should always use RGB(r,g,b) instead.
  4. yildi

    yildi Member Licensed User

    Thanks a lot to both of you!
    It seems that I have totally missed this point :(

    Best regards,

  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