Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Structure in listbox

Structure in listbox

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chandrasekharan P
    wrote on last edited by
    #1

    I am displaying the structure members in a listbox. But i need to remove the commented structure members and then display the the other members in the listbox. how do i do that?

    C 1 Reply Last reply
    0
    • C Chandrasekharan P

      I am displaying the structure members in a listbox. But i need to remove the commented structure members and then display the the other members in the listbox. how do i do that?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      What on earth do you mean by commented structure members ? You can change the displaymember in the listbox any time you like.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      C 1 Reply Last reply
      0
      • C Christian Graus

        What on earth do you mean by commented structure members ? You can change the displaymember in the listbox any time you like.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        C Offline
        C Offline
        Chandrasekharan P
        wrote on last edited by
        #3

        Hey Christian, i am getting this structure member from a C++ file. for Ex

        Struct{
        char name[20];
        int l_age;
        //int l_salary;
        double l_salary;
        } Employee;

        In this i need to remove int salary and display the rest of the item in the listbox. now i am using InStr to check for "l_" character to select the structure, but how do i avoid the commented members?

        modified on Friday, July 24, 2009 2:13 AM

        C 1 Reply Last reply
        0
        • C Chandrasekharan P

          Hey Christian, i am getting this structure member from a C++ file. for Ex

          Struct{
          char name[20];
          int l_age;
          //int l_salary;
          double l_salary;
          } Employee;

          In this i need to remove int salary and display the rest of the item in the listbox. now i am using InStr to check for "l_" character to select the structure, but how do i avoid the commented members?

          modified on Friday, July 24, 2009 2:13 AM

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          You can't remove anything from a struct. You can create a new struct that contains only the members you want, and can initialise itself from an instance of a C++ struct, but I fail to understand why you'd bother.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups