|
-
Dec 12th, 2006, 11:59 AM
#1
[RESOLVED] MSFlexGrid ColWidth
I'm having slight problems with mentioned. Whenever user enters a certain value it varies for +/-5 (my scale is in twips):
VB Code:
With MSFlexGrid1
.ColWidth(.Col) = 200 'results in [U]195[/U]
'or...
.ColWidth(.Col) = 1000 'results in 100[U]5[/U]
End With
Can this be fixed and if so, how?
It actually doesn't bother me (cause it's not even noticable) but it may bother the user. If he enters some value and he decides to change it later on it won't be the same. This may cause some doubts in my app... 
And here's another problem. I have set the minimum to be 200. It's fine when user enters 200 but if he wants to change it then it's suddenly 195... That doesn't seem right...
-
Dec 12th, 2006, 12:54 PM
#2
Re: MSFlexGrid ColWidth
the screen can only show things in pixels - since a pixel is (usually) 15 twips (check Screen.TwipsPerPixelX/Y for your settings) the value given to the .ColWidth is rounded to the nearest pixel. i.e. 195 is divisible by 15, 200 is not.
-
Dec 12th, 2006, 01:15 PM
#3
Re: MSFlexGrid ColWidth
Simple yet efficient 
Thank you 
Btw...
 Originally Posted by bushmobile
... since a pixel is (usually) 15 twips...
... i heard about that "usually" somewhere... are those 16:9 screens?
-
Dec 12th, 2006, 01:37 PM
#4
Re: MSFlexGrid ColWidth
Not necessarily.. It's down to display settings, but many of them (not just aspect ratio) have the capability of changing the TwipsPerPixel (X and/or Y).
-
Dec 12th, 2006, 01:43 PM
#5
Re: MSFlexGrid ColWidth
 Originally Posted by si_the_geek
Not necessarily.. It's down to display settings, but many of them (not just aspect ratio) have the capability of changing the TwipsPerPixel (X and/or Y).
Can that cause any problems in my app?
-
Dec 12th, 2006, 01:47 PM
#6
Re: MSFlexGrid ColWidth
i thought it was primarily based upon the DPI that your display is set to.
 Originally Posted by gavio
Can that cause any problems in my app?
kinda depends on your app - it's a good idea to test it under different display settings and assess it from there.
-
Dec 12th, 2006, 01:54 PM
#7
Re: MSFlexGrid ColWidth
Will do!
-
Dec 12th, 2006, 03:17 PM
#8
Re: MSFlexGrid ColWidth
 Originally Posted by bushmobile
i thought it was primarily based upon the DPI that your display is set to.
I'm pretty sure that would be correct - as a twip is 1/1440 of an inch.
I was just refering to the fact that various things can affect it. I have noticed a few different things over the years, but am not sure what they were - "Large Fonts" may be one of them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|