confirmed on - PC,mac
open tool.bmx and set your code fontsize to 11 or 12
and your tabsize to 4. On a pc make sure you
restart(bug 1446957). all the numbers for the const
will line up correctly.
now set you fontsize to 8 or 9(?) and restart (PC) the
const will now not line up correctly. it seems that
the tabsize in pixels is incorrect for these lower
resolutions. could not duplicate this problem on other
editors.
Logged In: YES
user_id=102488
I suspect that like bug 1446957 and friends, this is going
to be a BlitzMax problem, not a problem with the IDE code.
You may want to try to reproduce it in a short sample code
and post it in the BlitzMax bug reports.
Logged In: YES
user_id=1429218
on the PC this also occurs in WordPad so it seems that's is
a RTF textarea problem.... this doesn't explain the problem
on the mac
Logged In: YES
user_id=102488
Caused by a problem in BlitzMax, raised in this topic:
http://www.blitzbasic.com/Community/posts.php?topic=59526
Assigned to skid as we can't do naff all about it.
Logged In: YES
user_id=102488
Example code:
Local w:TGadget=CreateWindow("test textarea",100,100,300,300)
Local ta:TGadget=CreateTextArea(0,0,300,150,w)
Local b:TGadget = CreateButton("Size = 8" , 0 , 150 , 100 ,
50 , w)
Local b2:TGadget = CreateButton("Size = 12" , 150 , 150 ,
100 , 50 , w)
f:TGUIFont=LoadGuiFont("Courier New",12)
f2:TGUIFont=LoadGuiFont("Courier New",8)
SetTextAreaFont ta,f
SetTextAreaText ta,"Const TOOLRESET:Int=~t~t0~nConst
TOOLSHOW:Int=~t~t1~nConst TOOLREFRESH:Int=~t~t2~nConst
TOOLNEW:Int=~t~t3~nConst TOOLOPEN:Int=~t~t4~nConst
TOOLCLOSE:Int=~t~t5"
Repeat
WaitEvent()
Select EventSource()
Case b ; SetTextAreaFont ta , f2
Case b2 ; SetTextAreaFont ta, f
Case w
If EventID()=EVENT_WINDOWCLOSE Then End
End Select
Forever
End
Logged In: YES
user_id=102488
Originator: NO
Aha, this is caused by the tabsize being set as a GRAPHICAL size, not a CHARACTER size. i.e. the size of a "tab" in 8 point and in 12 point is the same number of PIXELS, not the same number of characters. As such, it is easy for the tabs to go askew.
No to find out if you can alter this behaviour...
Logged In: YES
user_id=102488
Originator: NO
I've done some more digging into this one, and raised a bug report on the BB forum for this, as it looks like the tab width is set based on a fixed width (8), whereas as it ought to use the width of the font.
http://www.blitzbasic.com/Community/posts.php?topic=67295
Someone with more C++ skills than me may be able to fix this up themselves?
Logged In: YES
user_id=102488
Originator: NO
After a response from skidracer on the bb forum, it is working as intended. In order to have tabs sized based on CHARACTERS in the font, we need to change the code to set the tab size based on the font width.
Logged In: YES
user_id=102488
Originator: NO
Priority dropped as we will have our own codearea soon.
Logged In: YES
user_id=102488
Originator: NO
Or if not our own textarea, this is dependent on skid adding a TGUIFont.Width() for proportional fonts