replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Get current position (or absolute position of a control)
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get current position (or absolute position of a control)

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Thomas



Joined: 18 Feb 2005
Posts: 57
Location: Gummersbach, Germany

PostPosted: Mon Aug 11, 2025 3:31 pm    Post subject: Get current position (or absolute position of a control) Reply with quote

I know how to set the absolute position for the next control with %ap.

Is there a format code providing the current position (= absolute position for the next control if not using %ap). This would help to better align controls in a grid. %rp can only be defined for the previous control but unfortunately not for any other reccent controls.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8251
Location: Salford, UK

PostPosted: Mon Aug 11, 2025 5:38 pm    Post subject: Reply with quote

There is no such format code. The only other related and undocumented code is %pp which takes four integer arguments and provides the pixel x,y,width and height of the next control.

If you can provide code that shows what the new code would look like and more details about what it does, then I could add it to the wish list.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2412
Location: Yateley, Hants, UK

PostPosted: Sun Aug 17, 2025 11:41 am    Post subject: Reply with quote

Thomas,

It all depends on how you design your forms / dialogs. If you have the same types of controls in rows or columns, then they line up automatically, especially if you arrange then with �boxes� (%ob � %cb). You don�t have to have the boxes visible � they can be no_border or invisible (same thing). If you have a design that has a lot of different controls then they never line up.

If you do force them to line up using %ap, then what happens when you move to a screen with a different resolution then they don�t line up any more, but if you have grouped them as I said then they always line up.

Controls also have a text prompt. If you put that to the left of a control, because Windows uses a proportionally spaced font the following controls don't line up. If the text is to the right, then the controls (such as radio buttons) will line up in a column - but the overall design and use of boxes is critical.

It�s something that bothered me for years until I discovered the trick(s).

Eddie
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 835
Location: Lanarkshire, Scotland.

PostPosted: Sun Aug 17, 2025 12:39 pm    Post subject: Reply with quote

Eddie, Perhaps I am lazy, but I find using %fn[Consolas] makes the alignment of text and controls much easier.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2412
Location: Yateley, Hants, UK

PostPosted: Sun Aug 17, 2025 2:15 pm    Post subject: Reply with quote

Ken, A useful find. I didn't realise that Consolas was a monospaced font.

Monospaced fonts are great when printing tabulated numerical output: when you lapse into standard Fortran output standard printer fonts often aren't great, and trying to tabulate numerical data with a proportionally-spaced font isn't an easy matter.

I'm presuming a couple of things. Firstly that you program solely for yourself as then aesthetics don't matter so much, and secondly that you prefer the text prompt on a control to come first - which is where monospacing helps the alignment. But it doesn't help the alignment of different types of control.

Some of my 'client base' was undergraduate students, and they are picky about things looking amateurish, turning their noses up at perfectly acceptable and functional DOS apps that saved them the time (and expense) of days doing topographic survey fieldwork. Fortunately, I'd retired before they demanded the apps on their mobile phones!

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group