Why Is There No Horizontal Scroll Bar On Edit Area

GentleMen

While Posting Codes Indentation is the biggest Problem
This [code] Code [/code] Thing Does Not Work The
Way It Is supposed To.
The Code With Better Indentation Is So Much Easier To
Communicate and understand.
For me it has never worked
I request you to the point of begging That something must be done
About how we communicate our code.
I think it is one of the reasons why our posts go unanswered for so long
or not answered at all.
because people are finding better ways to communicate on other sites.
All i Should have to do is cut and paste and okay since content is
coming from another editor i dont mind adjusting it a little.
But presently even after adjustment results go from Italy to Japan.
Please Help Us on this.

This site has emotional values for me and a sort of nostalgic attachment with it because it was my first programming connection with the world
it was my first portal and remains the most important one and Look At its
Name "PROGRAMMERS HEAVEN". What a Way To describe It . It is my demand
that this site must Must MUST be the best in every sense of the word
than any other site in the universe.

althou i am just a hobbyist and not a proffessional
i dont know how much weitage my advice carries with your
esteemed professionals.

Thankyou
RIGHT_THEN



Comments

  • Hi,

    I'm guessing that you mean that when you paste code into the textarea, it gets wrapped? Thing is, even if we could change that behavior (almost every browser seems to ignore "white-space: nowrap" for textareas, though), it'd make things worse. Your normal text (non-code) would then not wrap, and you'd be having to press enter at the end of every line. So basically, I don't think we can't do a whole lot about this in the post message page. Have you seen a better way anywhere else?

    Of course, when you view a message it should not wrap and should show the indentation properly, so any examples of that not happening would be helpful, as those we can fix.

    Sorry if I've misunderstood what you're saying, and of course thanks for the feedback. :-)

    Thanks,

    Jonathan
    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • Sir Mr.Jonathan

    Thankyou For That Reply
    Yes That Is also what i meant to say
    it is not only cut and paste it is even when we
    write statements some statements have to be larger
    then the width of this text box espacially when
    we are presenting exactly our code to someone to understand.

    Sir My SImple SUggestion is why not put a horizontal Scroll
    bar just like the Vertical Scrool Bar Which has been placed
    in this Edit box.It would make things easier.then Text WOnt Have
    To Wrap but it would keep on extending the user can scroll
    Left and right to Resonable width to read the text.
    even if it has problems then just put it once over there this
    Horizontal scroll bar for us to see first hand that why
    was it not placed there in the first place.

    Secondly the posts we read cant these be placed in
    a same kind of TExt box like the ones we write in
    SO we only have to scroll that control and not the whole browser.


    SO thanks sir i will bother you again with something
    untill then

    Thankyou
    RIGHT_THEN


  • : Sir My SImple SUggestion is why not put a horizontal Scroll
    : bar just like the Vertical Scrool Bar Which has been placed
    : in this Edit box.It would make things easier.then Text WOnt Have
    : To Wrap but it would keep on extending the user can scroll
    : Left and right to Resonable width to read the text.
    : even if it has problems then just put it once over there this
    : Horizontal scroll bar for us to see first hand that why
    : was it not placed there in the first place.
    Yes, but a lot of the time when messages are written, they contain not just code, but many normal sentences and paragraphs of text too. You want that to wrap automatically. So I think that it would be quite confusing if they did not. (Of course, we could make people press enter at the end of every line of text they type if they want to be able to see more of the paragraph they are currently writing. But I think people would dislike this a LOT more than their code wrapping in the edit text box). And there's no easy or portable way that I know of where we can make the textarea recognize code tags and wrap conditionally on those.

    Also, if you're posting and want to see how it's going to display before you post it, please don't forget there's a preview button for this purpose.

    : Secondly the posts we read cant these be placed in
    : a same kind of TExt box like the ones we write in
    : SO we only have to scroll that control and not the whole browser.
    Having horizontal scrolling of the code boxes when it's wider than the available space would certainly resolve some of the layout issues we get today when people post code examples with long lines, yes. That's one thing that I think we can and should fix; it's on the todo list.

    Thanks,

    Jonathan
    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • Sorry to hijack this thread, but the idea is sort of related :)

    In alot of posts, members have posted alot of fairly large code segments. This tends to make things look a bit messy (even using code blocks), and fairly hard to read the rest of the post.

    I have seen this idea implemented in some other sites, and thought it might benifit(sp?) here.

    What if, when a user creates a code block larger then x number of lines of code, the forum software puts the code block within a textarea with its own scrollbars?

    This way, the code does not make the post look very big, as it would have a horizontal and vertical scrollbar, it wont mess up the thread. Color highlighting for different languages would also be nice, but can not imagine how hard that would be. (I really dont know - I dont know asp)

    Just some thoughts...

    btw Jonathan, I have always wondered what the code in your sig does :)

    Thanks! :D

    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • : What if, when a user creates a code block larger then x number of
    : lines of code, the forum software puts the code block within a
    : textarea with its own scrollbars?
    :
    : This way, the code does not make the post look very big, as it would
    : have a horizontal and vertical scrollbar, it wont mess up the
    : thread.
    Yeah, I like that idea, especially doing it sensitive to the number of lines that are posted. It can even be done without a textbox too, but simply with the "overflow: scroll" CSS property. Will put on the todo list.

    : Color highlighting for different languages would also be
    : nice, but can not imagine how hard that would be.
    I want to do this also, and we already have a third-party syntax highlighting engine in place for the ZIP file viewer.

    I'm still debating the best way to do it for the forums, since you need to know what language the code is in to select the correct highlighter (you just look at the extensions in the ZIP file viewer). One way is to allow an optional parameter on the code tag ([code=c#]), another is to select a language by forum since most of the code posted on the C# forum will be C#. Or of course both.

    : (I really dont know - I dont know asp)
    It's ASP.NET now, thankfully. And C# 3.0 as the language, which is actually quite nice, though I probably take it to whole new levels of evil (see my Divvy extension method in the pheaven blog, for example ;-)).

    : btw Jonathan, I have always wondered what the code in your sig does
    : :)
    It's a Perl script. There's a running joke in the Perl community about writing completely unreadable scripts that print the text, "Just Another Perl Hacker". So that's my effort. :-)

    Jonathan
    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • The forum that I have seen defaults to C++, but provides a parameter for the code tag, kind of like this:

    [ code lang="cpp" ] - C++
    [ code lang="asm" ] - assembly
    [ code lang="vb" ] - visual basic
    [ code lang="perl"] - perl

    etc...

    btw, it would also be nice to provide tags to only display the square brackets, if possible :-)

    Thanks for everything :-D
    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=http://www.brokenthorn.com]Website :: OS Development Series[rightbr][/link][/size]
  • : The forum that I have seen defaults to C++, but provides a parameter
    : for the code tag, kind of like this:
    :
    : [ code lang="cpp" ] - C++
    : [ code lang="asm" ] - assembly
    : [ code lang="vb" ] - visual basic
    : [ code lang="perl"] - perl
    :
    I guess we'd go for more like [ignore][code=cpp][/ignore] just for consistency with all the other tags. I think the default to a sensible language (set on a per-forum basis) and allow users to override it would be good though.

    : btw, it would also be nice to provide tags to only display the
    : square brackets, if possible :-)
    You can use the [leftbr]ignore]...[leftbr]/ignore] tag pairs for this, or [ignore][leftbr] and [rightbr][/ignore] for individual [ and ].

    Jonathan


    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories