WhoCanDo Posted December 14, 2011 Share Posted December 14, 2011 Hi, I've cut and pasted from the VS Editor several times and as I am writing this post I see the format is correct. ie "for" is left justified and "begin" is two spaces in as is Create, Set & end; for i := 4 to 6 do begin CreateThreeStateCheckBox (DialogID, i, Concat (' ', i)); SetBelowItem (DialogID, i - 1, i, 0, 0); end; but when I hit "Submit", everything is left justified. This is OK for above but when there are many more lines of code it becomes harder to read. What am I doing wrong? Quote Link to comment
Pat Stanford Posted December 14, 2011 Share Posted December 14, 2011 The forum does not understand tabs which are probably what you are getting from the VS editor. You can either go through and use spaces manually, or paste into a smart text editor and have that convert the tabs to spaces to then copy and paste here. Quote Link to comment
WhoCanDo Posted December 14, 2011 Author Share Posted December 14, 2011 for i := LayerCount -1 downto 1 do begin h := NextLayer (h); LayerName := GetLName (h); end; No luck Pat, The original post was with spaces and the above is with spaces and "begin" has a tab. I have previewed this reply after copying from VW, copy & paste through Word, WordPad & Notepad but nothing works. I even added spaces after pasting but everything in the forum seems to be left justified. Is there a switch I need to flick in My Stuff? I have seen many people with my problem and I have also seen several comments from replies saying please format your code which is what I would like to do. Any other ideas? Quote Link to comment
Pat Stanford Posted December 14, 2011 Share Posted December 14, 2011 Ok, let me try this. I have indented the first version here with spaces in the forum editor. for i := LayerCount -1 downto 1 do begin h := NextLayer (h); LayerName := GetLName (h); end; Now I have switched to the Full Reply mode and put in a Code block (the # sign in the editor menu across the top) and indented using spaces. for i := LayerCount -1 downto 1 do begin h := NextLayer (h); LayerName [i] := GetLName (h); end; So, I guess you need to use the code block to get your indents to work right. Quote Link to comment
WhoCanDo Posted December 14, 2011 Author Share Posted December 14, 2011 Like this: for i := 4 to 6 do begin CreateThreeStateCheckBox (DialogID, i, Concat (' ', i)); SetBelowItem (DialogID, i - 1, i, 0, 0); end; Quote Link to comment
WhoCanDo Posted December 14, 2011 Author Share Posted December 14, 2011 No that didn't work unless I don't understand you correctly. Quote Link to comment
MullinRJ Posted December 14, 2011 Share Posted December 14, 2011 Who, ???If you've ever read any of my posts, you have seen I use indenting all the time. Is this what you're looking for? for i := 4 to 6 do ??begin ????CreateThreeStateCheckBox (DialogID, i, Concat (' ', i)); ????SetBelowItem (DialogID, i - 1, i, 0, 0); ??end; for i := LayerCount -1 downto 1 do ??begin ????h := NextLayer (h); ????LayerName := GetLName (h); ??end; ???As you've noticed, the TechBoard removes leading white spaces (Sp & Tb), and compresses multiple white spaces in the middle of lines to a single space character. ???The character you want to enter is Non-Breaking-Space (NBSP). On the MAC, use Option-Space. On Windows, try Alt+0160 or Alt+255 (on numeric keypad). The Windows info comes from Wikipedia, and I haven't tried it. Please, only do this for short code segments you want to post inline. For longer code blocks that other people might want to copy, preserve your tabbed formatting with the [/code ] headers. Otherwise, people will have to convert your NBSP characters to Tabs, and that's a pain. ???As for using [kode] [/kode] (misspelled intentionally to prevent it from working), you need to place your CODE between the ] [ characters. [b][kode] Your Code Here [/kode][/b] It will keep its formatting and be placed in a nice little gray box as seen in Pat's post. Raymond Quote Link to comment
WhoCanDo Posted December 15, 2011 Author Share Posted December 15, 2011 WhoCanDo: for i := 4 to 6 do begin CreateThreeStateCheckBox (DialogID, i, Concat (' ', i)); SetBelowItem (DialogID, i - 1, i, 0, 0); end; Thanks Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.