Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7933815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:26:31+00:00 2026-06-03T21:26:31+00:00

In lack of a Value property I planned to use Classes for storing Text

  • 0

In lack of a Value property I planned to use Classes for storing Text and Value properties for my ComboBox items. So far I’ve succeeded.

Here is my class:

Public Class clCombobox
Public cname As String
Public cvalue As Integer

    Public Property Display() As String
    Get
        Return Me.cname
    End Get
    Set(ByVal value As String)
        Me.cname = value
    End Set
End Property
Public Property Value() As String
    Get
        Return Me.cvalue
    End Get
    Set(ByVal value As String)
        Me.cvalue = value
    End Set
End Property


Public Sub New(ByVal name As String, ByVal value As String)
    cname = name
    cvalue = value
End Sub

Public Overrides Function ToString() As String
    Return cname
End Function
End Class

Data is being added to the ComboBox like this:

cmbComboxBox.Items.Add(New clCombobox("Text", 1))

It seems like this works so far. But how do I get data back. Like if I want the value of the selected CheckBox item?

I tried using:

CType(cmbCombobox.SelectedItem, clCombobox).Value()

Did not work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:26:33+00:00Added an answer on June 3, 2026 at 9:26 pm

    As per the documentation, use the SelectedItem property to retrieve the object that you stored in it.

    Code to retrieve value you want:

    Dim selectedItem as clCombobox = CType(cmbComboBox.SelectedItem, clCombobox)
    Dim value As Integer = selectedItem.cvalue
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a silverlight view (for lack of a better work) with some text
This question covncerns my lack of understanding of how to use the core data
Using Javascript/jQuery, is it possible to get the Property name along with it's value
I'm trying to change the value of an Editable-Text control in Allegro CL (version
I lack understanding of some basic MVC concepts, despite all my searching. I created
The lack of uniformity of the pgup print screen arrows etc is getting on
Pardon my complete lack of javascript knowledge in advance, but I can't seem to
I apologize for my lack of jquery knowledge. I'm using jquery 1.6.2, and trying
So i have a lack of knowledge issue with this. I'm currently streaming my
One thing I lack understanding on is how can code compiled for an Intel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.