Recent

Author Topic: Tooltip formating  (Read 17608 times)

rvk

  • Hero Member
  • *****
  • Posts: 6112
Re: Tooltip formating
« Reply #30 on: July 25, 2015, 12:16:17 am »
Actually I have it enabled.
i also have the show special character enabled
Yes, that would help (the show special character). Just tried it again but... argh... once you get used to something you can't unlearn it easily. You don't want to know how long I stayed with the cursor keys on the numeric pad :) I was finally forced to kick that habit when I got a keyboard without numlock (temporary experiment from Logitech at the time, I guess).

Quote
for me tabs are for formatting. And formatting only matters in comments.
another example is multi-columned text with aligned columns.
Did you ever test that multi-columned text with different tab-settings?? I'm not sure at what number you've got it but try setting it at something small (2 or 4) and reload your project. All your aligned text could get messed up because you expected it to align at a specific tab-setting. If you can force the setting to a specific number ("<<now tab=8>>") in the source-code you might be save but there is no such setting.

This (8 tab-space): (there is a tab before the |)
Code: [Select]
1234567890
|123456 |test
|12     |test
would become this (4 tab space):
Code: [Select]
1234567890
|123456 |test
|12 |test
So... yeah... really bad.

Tab settings in source-code editors are not made for formatting layout. (They are only for indentation !!)
The fact that they depend on a variable number of spaces a user can set determines that. If source-code editors always used the same tab setting or had an option to set tabs like in rtf they could be used for this, but they haven't.

Quote
a tab should set the cursor to a place on the sheet
Correct... always to the same position... and again... that is not how a tab in a source-code editor works... So, don't use them like that. The layout will be messed up for somebody with different tab-settings.

Quote
... but i havent found that (jet) in HTML. I was making experiments with <ul>-tag as a tab-replacement but not very successful.
In the past I made a rtf2html converter. You could try converting traditional tabs to html-tables but that's a real pain. I finally ended up using div-elements to place the following text at a specific location (according to the tab).

Code: [Select]
<div style="position: absolute; left: 200px">text</div>
So every tab I encountered would be translated to a "close-div" and an "open-div"-element. (Lines started and ended with a div too)

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Tooltip formating
« Reply #31 on: July 25, 2015, 08:15:54 am »
Yes, that would help (the show special character). Just tried it again but... argh... once you get used to something you can't unlearn it easily. You don't want to know how long I stayed with the cursor keys on the numeric pad :) I was finally forced to kick that habit when I got a keyboard without numlock (temporary experiment from Logitech at the time, I guess).

LOL, me too, to me it was a Laptop without extra Num-Block :)
Before that people could see that i was on the computer because the Num was lit, ....

Did you ever test that multi-columned text with different tab-settings?? I'm not sure at what number you've got it but try setting it at something small (2 or 4) and reload your project. All your aligned text could get messed up because you expected it to align at a specific tab-setting. If you can force the setting to a specific number ("<<now tab=8>>") in the source-code you might be save but there is no such setting.

This (8 tab-space): (there is a tab before the |)
Code: [Select]
1234567890
|123456 |test
|12     |test
would become this (4 tab space):
Code: [Select]
1234567890
|123456 |test
|12 |test
So... yeah... really bad.
But that's only if someone else want to read your code, and if that someone changes the default-setting from 8 to something.
In my opinion, changing the default, you have to know what you are doing.
But even when it's 4 or 6 spaces, It's better readable than without tabs.
Code: [Select]
1234567890
|123456|test
|12|test

Tab settings in source-code editors are not made for formatting layout. (They are only for indentation !!)
The fact that they depend on a variable number of spaces a user can set determines that. If source-code editors always used the same tab setting or had an option to set tabs like in rtf they could be used for this, but they haven't.
What people used to do, and what the intention of the original developer was always differs.
The most (normal) people (colleagues) ,i see, using a wordprocessor, use (Paragraph-)Break at the end of line, where they just could type on. 
So I highly doubt, using habits as a meassuring device. (People are people, you know ....)

Correct... always to the same position... and again... that is not how a tab in a source-code editor works... So, don't use them like that. The layout will be messed up for somebody with different tab-settings.
Take Notepad++,Ultraedit or delphi there it works. (meaning You could set the font to a non-monospaced, and tab puts the cursor to the next tab-stop-position. 
(BTW: setting the font to a non-monospaced in lazarus looks really ugly ...)

In the past I made a rtf2html converter. You could try converting traditional tabs to html-tables but that's a real pain. I finally ended up using div-elements to place the following text at a specific location (according to the tab).

Code: [Select]
<div style="position: absolute; left: 200px">text</div>
So every tab I encountered would be translated to a "close-div" and an "open-div"-element. (Lines started and ended with a div too)
Using html-tables, oh yeah,  thats'a pain ...
Using <DIV> maybe the only way... [/quote]
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

yamer

  • Jr. Member
  • **
  • Posts: 87
Re: Tooltip formating
« Reply #32 on: July 25, 2015, 11:02:06 am »
These problems of non breaking spaces and tabs do not seem important to me. The patch seems to work well enough to answer my original question. So I will submit it. I hope it will be accepted.

Thanks to all.

yamer

  • Jr. Member
  • **
  • Posts: 87
Re: Tooltip formating
« Reply #33 on: July 25, 2015, 01:01:15 pm »
Arrrgh! I submitted the patch in the wrong category. I had not seen the patch category. Can anyone fix this (it seems I can not do it) ?

http://bugs.freepascal.org/view.php?id=28430

 

TinyPortal © 2005-2018