Results 1 to 7 of 7

Thread: [2005] Creating own class troubles

Threaded View

  1. #1

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    [2005] Creating own class troubles

    Ive been working in Java a ton lately, seems my mind is slipping here..

    vb Code:
    1. Public Class menu
    2.     Dim mFont As Font
    3.     Dim mMenu As String
    4.     Public ReadOnly Property getFont() As Font
    5.         Get
    6.             Return mFont
    7.         End Get
    8.     End Property
    9.  
    10.     Public WriteOnly Property setFont(ByVal fontName As String) As String
    11.         Set(ByVal value As String)
    12.             mFont = New Font(fontName, 12, FontStyle.Regular)
    13.         End Set
    14.     End Property
    15.  
    16.     Public ReadOnly Property getMenu() As String
    17.         Get
    18.             Return mMenu
    19.         End Get
    20.     End Property
    21.  
    22.     Public WriteOnly Property setMenu(ByVal menuText As String) As String
    23.         Set(ByVal value As String)
    24.             mMenu = menuText
    25.         End Set
    26.     End Property
    27. End Class

    In my program I try to set the menuText:

    vb Code:
    1. rMenu.setMenu = "A"
    Attached Images Attached Images  
    Last edited by |2eM!x; Apr 5th, 2007 at 11:52 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width