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. small problemo

small problemo

Scheduled Pinned Locked Moved Visual Basic
help
3 Posts 3 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.
  • D Offline
    D Offline
    DanChin
    wrote on last edited by
    #1

    i am writing a small control. my control writes some text to it but i need to write a function so that when the text has been wrote the control resizes to fit the new text could anybody help me with this Thanks. Dan

    M 1 Reply Last reply
    0
    • D DanChin

      i am writing a small control. my control writes some text to it but i need to write a function so that when the text has been wrote the control resizes to fit the new text could anybody help me with this Thanks. Dan

      M Offline
      M Offline
      Mandar Patankar
      wrote on last edited by
      #2

      It all depends on what type of control you are writing your text.lets assume that you are writing your text in a textbox control. Then you need to keep the width of this control fix and it will have a variable height which will be intialized at run time. keep the multiline property =false first see how many characters can fit in a single line of this textbox. Now increase the height when ever the limit is reached or you need to go to next line. lets say the textbox can fit 20 chars now if the string length is more than 20 then u need to go to next line.So increase the height of the textbox. or U can use a list box. where you can make it grow to certain height and then enable the scrollbar so that it doesnt go beyond the form boundary. hope this helps Mandar Patankar Microsoft Certified professional

      A 1 Reply Last reply
      0
      • M Mandar Patankar

        It all depends on what type of control you are writing your text.lets assume that you are writing your text in a textbox control. Then you need to keep the width of this control fix and it will have a variable height which will be intialized at run time. keep the multiline property =false first see how many characters can fit in a single line of this textbox. Now increase the height when ever the limit is reached or you need to go to next line. lets say the textbox can fit 20 chars now if the string length is more than 20 then u need to go to next line.So increase the height of the textbox. or U can use a list box. where you can make it grow to certain height and then enable the scrollbar so that it doesnt go beyond the form boundary. hope this helps Mandar Patankar Microsoft Certified professional

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks

        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