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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Custom Control Propertygrid help

Custom Control Propertygrid help

Scheduled Pinned Locked Moved Visual Basic
helpcsharpc++algorithms
2 Posts 2 Posters 1 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.
  • H Offline
    H Offline
    HaloZa
    wrote on last edited by
    #1

    After searching many sites trying to find a free custom propertygrid / propertylist i have come up empty handed, there are a few for c++ but nothing free for vb.net. I reason i am looking for a free propertygird is because i want to use it in a open source project i am working on. So i decided to have a go at creating one myself... this being my first custom control that i have tried to create its proving to be a chalange. Ok any anyways lets see if anyone can help me with a few problems. I have a collection for Categories and a collection for Entries. Cateogies are like the headers as such with the + - in the propertygrid The entry collection is a object. I then set the object to say ie a textbox entry or a progress bar entry... This has all gone well so far. Problem/Suggestion 1 I basically draw the lable on the left, value on the right using drawstring. When i click on an entry i then dynamically add a textbox basically the size of the value side. I set the focus to the textbox. Set the value of the textbox and hide the border amoungst other things. Is this the best way of doing this? This method works, but seems a bit clumsy when font size changes. I was thinking that maybe instead i need to capture keypresses and use draw string to draw changes unstead of using a textbox. Problem/Suggestion 2 I am going to use the render part of controls to draw the progressbar and buttons. But a control i am slightly lost with adding as an entry is a combobox. I can add the combobox like i did with the textbox above but i cant resize the combobox small enough to the size i would like it without it screwing up. Using the renderer i can draw the button for the combobox but yea i dont know how to draw the actuall box part. I started to experiment with adding a usercontrol with say a listbox and then showing that as the drop down part. Does any 1 have any suggestions on this? Problem/Suggestion 3 I supose i will at some stage want to show tool tips for half hidden lables or values ... any one know where to begin on this? if u would like to see what it sort of looks like atm http://gtools.sourceforge.net/pg.JPG the horrible choise of colours is just to see where things are drawn Thanks

    D 1 Reply Last reply
    0
    • H HaloZa

      After searching many sites trying to find a free custom propertygrid / propertylist i have come up empty handed, there are a few for c++ but nothing free for vb.net. I reason i am looking for a free propertygird is because i want to use it in a open source project i am working on. So i decided to have a go at creating one myself... this being my first custom control that i have tried to create its proving to be a chalange. Ok any anyways lets see if anyone can help me with a few problems. I have a collection for Categories and a collection for Entries. Cateogies are like the headers as such with the + - in the propertygrid The entry collection is a object. I then set the object to say ie a textbox entry or a progress bar entry... This has all gone well so far. Problem/Suggestion 1 I basically draw the lable on the left, value on the right using drawstring. When i click on an entry i then dynamically add a textbox basically the size of the value side. I set the focus to the textbox. Set the value of the textbox and hide the border amoungst other things. Is this the best way of doing this? This method works, but seems a bit clumsy when font size changes. I was thinking that maybe instead i need to capture keypresses and use draw string to draw changes unstead of using a textbox. Problem/Suggestion 2 I am going to use the render part of controls to draw the progressbar and buttons. But a control i am slightly lost with adding as an entry is a combobox. I can add the combobox like i did with the textbox above but i cant resize the combobox small enough to the size i would like it without it screwing up. Using the renderer i can draw the button for the combobox but yea i dont know how to draw the actuall box part. I started to experiment with adding a usercontrol with say a listbox and then showing that as the drop down part. Does any 1 have any suggestions on this? Problem/Suggestion 3 I supose i will at some stage want to show tool tips for half hidden lables or values ... any one know where to begin on this? if u would like to see what it sort of looks like atm http://gtools.sourceforge.net/pg.JPG the horrible choise of colours is just to see where things are drawn Thanks

      D Offline
      D Offline
      Danilo Corallo
      wrote on last edited by
      #2

      Hi, please feel free to add, modify and use source code from my recent article: http://www.codeproject.com/useritems/PropertyGridEx.asp Kind Regards

      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