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. Button Position in textbox

Button Position in textbox

Scheduled Pinned Locked Moved C#
csharpdotnethelpquestion
1 Posts 1 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.
  • D Offline
    D Offline
    DougW48
    wrote on last edited by
    #1

    I have a class that I inherited from the DataGridTextBoxColumn class. There is a button that is in the textbox of this column, similar to a combobox button (only it has different functionality than the combobox). Anyways, first thing in the override Edit function, I am positioning the button so that it is on the right hand side of the TextBox. The code seems simple enough... myButton.SetBounds( this.TextBox.Width - this.TextBox.Height, 0, this.TextBox.Height, this.TextBox.Height ); Something is crazy about this though. This code works perfectly when the application runs under the .NET Framework 1.0.3705, and the button is always positioned exactly as desired. However, when the application runs under the .NET Framework 1.1, the button REFUSES to go where it is supposed to! What's the discrepancy between these versions, and what in the world am I doing wrong? This isn't the only place I'm noticing a difference in the behavior of my program, but it seems like no matter what I do, I can't seem to prevent these effects from occurring. Need Help! Thanks a ton!

    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