Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Aug 18, 2019 12:21 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Converting size in twips of user interface items in VB6
PostPosted: Mon Oct 03, 2011 1:12 pm 
Offline
User avatar

Joined: Sat Jun 04, 2011 8:29 am
Posts: 387
Hi,

I already have a user interface my customers are used to.... I'd like to set the button width and height as well as panels sizes etc. to be the same in RealBasic... but in VB6 the height and width of a button is in twips I think.

So Height 675 and Width 1755 .... how do I convert that to set the props in RB?

This will help me set the size of all my other controls as well.

Also I found that the grid controls and buttons are not resizing when I hit the Maximize button on the form. Do I have to do that manually in code? if so where would I put it.

-Tim

_________________
Currently using:
Windows XP Pro SP3
Real Studio 2011 Release 4.3 Enterprise
and
Mac OS 10.7.4
Real Studio 2011 Release 4.3 Enterprise
(finally also compiled on Mac)


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting size in twips of user interface items in VB6
PostPosted: Mon Oct 03, 2011 1:34 pm 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
VB measurements can be pixels or twips.
In RB its pixels.

A twip is 1/1440 of an inch.
On a screen running 96 dpi, to convert trips to pixels, roughly multiply by 1440/96

When you have the control on screen, you can use the anchor properties at the right to determine how the control moves about when the window resizes


Last edited by kermit on Mon Oct 03, 2011 11:40 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Converting size in twips of user interface items in VB6
PostPosted: Mon Oct 03, 2011 5:55 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
uh... I thought a TWIP was 1/1440" and was something in VB that I avoided like the plague.
it is 1/20 of a POINT

Quote:
A twip (abbreviating "twentieth of a point", "twentieth of an inch point"[citation needed], or "twentieth of an Imperial point"[citation needed]) is a typographical measurement, defined as 1/20 of a typographical point. One twip is 1/1440 inch or 17.639 µm when derived from the PostScript point at 72 to the inch, and 1/1445.4 inch or 17.573 µm based on the printer's point at 72.27 to the inch.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting size in twips of user interface items in VB6
PostPosted: Mon Oct 03, 2011 9:52 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
Quote:
Also I found that the grid controls and buttons are not resizing when I hit the Maximize button on the form. Do I have to do that manually in code? if so where would I put it.


You can either set their Lock properties (left, top, right, bottom) of each control, or you can resize them manually in the Window.Resizing or Window.Resized events. Regardless, you'll spend some time making sure they work properly for a maximized window vs. a default window size.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting size in twips of user interface items in VB6
PostPosted: Mon Oct 03, 2011 11:37 pm 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Quote:
I thought a TWIP was 1/1440" and was something in VB that I avoided like the plague.
it is 1/20 of a POINT


Quite right.
Its been a long time, and I too avoided twips like the plague.
Even Apple doesn't like them. It keeps changing twips to trips as I type, hence the edit.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group