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. C#
  4. Need guidance: workspace & reflection

Need guidance: workspace & reflection

Scheduled Pinned Locked Moved C#
helpcsharpjavaquestionworkspace
2 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.
  • M Offline
    M Offline
    motojojo
    wrote on last edited by
    #1

    Hi, I'm a Java programmer and I know a bit of C# (let's say all the fundamentals and perhaps a bit more), however, I still lack a lot of experience on the field of programming form-applications. I have a concept for something of a Microsoft PowerPoint-like application. My problem is: I don't know how/where to start on building the framework for the GUI. When the program is running, the user should be able to drag and drop controls (text, buttons, ..) on the workspace, and my idea was to render them using reflection (does anyone know a 101 on this?). Is there a good starter kit for building 'workspace' applications? Your help is very much appreciated. - A young C# programmer

    L 1 Reply Last reply
    0
    • M motojojo

      Hi, I'm a Java programmer and I know a bit of C# (let's say all the fundamentals and perhaps a bit more), however, I still lack a lot of experience on the field of programming form-applications. I have a concept for something of a Microsoft PowerPoint-like application. My problem is: I don't know how/where to start on building the framework for the GUI. When the program is running, the user should be able to drag and drop controls (text, buttons, ..) on the workspace, and my idea was to render them using reflection (does anyone know a 101 on this?). Is there a good starter kit for building 'workspace' applications? Your help is very much appreciated. - A young C# programmer

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, I dont see the need to use reflection for this. You can build a simple draw application by having a panel (initially empty) and some user interface operations (mouse clicks and drags, and/or keyboard input) that cause new graphical objects to be created, positioned, moved, resized, etc. That would take an internal representation of your drawing (say user-defined objects stored in an ArrayList), a paint method that knows how to paint them all, and a Panel.Invalidate() every time you change the drawing. Similarly you can make something like a form designer inside some container (a Form, or again a Panel): with similar user interface operations you can create, position, move, resize, etc normal Controls. You may not need to hold your "form design" in an ArrayList this time, you could simply add all new Controls to the Form.Controls or Panel.Controls collection that is already there. Also the painting is automatic for all controls inside the Controls collection, so the only thing not to forget is calling Invalidate(). You may find some examples on CodeProject, I suggest you search for "Form Designer". Hope this helps. :)

      Luc Pattyn [My Articles]

      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