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. Web Development
  3. Heading text alignment problem

Heading text alignment problem

Scheduled Pinned Locked Moved Web Development
winformshelptutorial
6 Posts 3 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
    Mark F
    wrote on last edited by
    #1

    I am working on a page that allows a user some control over layout and formatting. I want the user to be able to align the heading of a page just like the Windows Forms ContentAlignment property. For example: TopLeft, MiddleLeft, BottomLeft, MiddleTop, and so on.

    Thanks, Mark

    Richard Andrew x64R P 2 Replies Last reply
    0
    • M Mark F

      I am working on a page that allows a user some control over layout and formatting. I want the user to be able to align the heading of a page just like the Windows Forms ContentAlignment property. For example: TopLeft, MiddleLeft, BottomLeft, MiddleTop, and so on.

      Thanks, Mark

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      And your question is?

      The difficult we do right away... ...the impossible takes slightly longer.

      1 Reply Last reply
      0
      • M Mark F

        I am working on a page that allows a user some control over layout and formatting. I want the user to be able to align the heading of a page just like the Windows Forms ContentAlignment property. For example: TopLeft, MiddleLeft, BottomLeft, MiddleTop, and so on.

        Thanks, Mark

        P Offline
        P Offline
        Peter Leow
        wrote on last edited by
        #3

        I'm not sure what you want. Let me guess. If what you want is web page styling, then that is this web styling language called Cascading Style Sheet or CSS in short. If you want user control over elements on a web page, then you can look to HTML5. If you want more dynamic contents then jQuery is what you are looking for. You can get some good tutorials at the W3C site.

        M 1 Reply Last reply
        0
        • P Peter Leow

          I'm not sure what you want. Let me guess. If what you want is web page styling, then that is this web styling language called Cascading Style Sheet or CSS in short. If you want user control over elements on a web page, then you can look to HTML5. If you want more dynamic contents then jQuery is what you are looking for. You can get some good tutorials at the W3C site.

          M Offline
          M Offline
          Mark F
          wrote on last edited by
          #4

          Sorry for the ambiguity. Windows has a ContentAlignment property that aligns the text in a control from TopLeft to BottomRight, and also middles. I know that using CSS you can align textual content using the div as a container. I was wondering if there is a way to use the ContentAligment property values from a Windows form to set the div container css. So if the user selects MiddleLeft the text is aligned that way in the html markup.

          Mark

          P 1 Reply Last reply
          0
          • M Mark F

            Sorry for the ambiguity. Windows has a ContentAlignment property that aligns the text in a control from TopLeft to BottomRight, and also middles. I know that using CSS you can align textual content using the div as a container. I was wondering if there is a way to use the ContentAligment property values from a Windows form to set the div container css. So if the user selects MiddleLeft the text is aligned that way in the html markup.

            Mark

            P Offline
            P Offline
            Peter Leow
            wrote on last edited by
            #5

            I understand now. You may want to check out the following URL: Hosting a Windows Control in a Web Form by Tim Stall

            M 1 Reply Last reply
            0
            • P Peter Leow

              I understand now. You may want to check out the following URL: Hosting a Windows Control in a Web Form by Tim Stall

              M Offline
              M Offline
              Mark F
              wrote on last edited by
              #6

              Thanks for the link. I used a label control for the heading. That way I could change the alignment and the font. Works fine.

              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