Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
panta rhei

Funky (modern) dialogs

Recommended Posts

I smoke only normal cigarettes, but I still see funny things!

Edited by panta rhei

Share this post


Link to post

Where is the code?

From the looks of it you have shifted the edit fileds to the right each time you add one below but I can't tell much without the dialog code.

Share this post


Link to post

Yeah I agree with klinzey. i find its best to align everything first then I play with the edit fields to shift certain items. You also have to know which item is the anchor item. If you shift the anchor item all items aligned with it will shift too. so it is possible you have multiple shiftings.

Share this post


Link to post
Where is the code?

From the looks of it you have shifted the edit fileds to the right each time you add one below but I can't tell much without the dialog code.

SETFIRSTLAYOUTITEM(dialog, 101);

{labels 1 }

SETBELOWITEM(dialog, 101, 102, 0, 2);

SETBELOWITEM(dialog, 102, 103, 0, 2);

SETBELOWITEM(dialog, 103, 104, 0, 2);

SETBELOWITEM(dialog, 104, 105, 0, 2);

SETBELOWITEM(dialog, 105, 106, 0, 2);

SETBELOWITEM(dialog, 106, 107, 0, 2);

SETBELOWITEM(dialog, 107, 108, 0, 2);

SETBELOWITEM(dialog, 108, 109, 0, 2);

SETBELOWITEM(dialog, 109, 110, 0, 2);

SETBELOWITEM(dialog, 110, 111, 0, 2);

SETBELOWITEM(dialog, 111, 112, 0, 2);

SETBELOWITEM(dialog, 112, 113, 0, 2);

SETBELOWITEM(dialog, 113, 114, 0, 2);

SETBELOWITEM(dialog, 114, 115, 0, 2);

SETBELOWITEM(dialog, 115, 116, 0, 2);

{fields 1 }

SETRIGHTITEM(dialog, 101, 201, 2, 0);

SETRIGHTITEM(dialog, 102, 202, 2, 0);

SETRIGHTITEM(dialog, 103, 203, 2, 0);

SETRIGHTITEM(dialog, 104, 204, 2, 0);

SETRIGHTITEM(dialog, 105, 205, 2, 0);

SETRIGHTITEM(dialog, 106, 206, 2, 0);

SETRIGHTITEM(dialog, 107, 207, 2, 0);

SETRIGHTITEM(dialog, 108, 208, 2, 0);

SETRIGHTITEM(dialog, 109, 209, 2, 0);

SETRIGHTITEM(dialog, 110, 210, 2, 0);

SETRIGHTITEM(dialog, 111, 211, 2, 0);

SETRIGHTITEM(dialog, 112, 212, 2, 0);

SETRIGHTITEM(dialog, 113, 213, 2, 0);

SETRIGHTITEM(dialog, 114, 214, 2, 0);

SETRIGHTITEM(dialog, 115, 215, 2, 0);

SETRIGHTITEM(dialog, 116, 216, 2, 0);

{labels 2 }

SETRIGHTITEM(dialog, 202, 117, 2, 0);

SETBELOWITEM(dialog, 117, 118, 0, 2);

SETBELOWITEM(dialog, 118, 119, 0, 2);

SETBELOWITEM(dialog, 119, 120, 0, 2);

SETBELOWITEM(dialog, 120, 121, 0, 2);

SETBELOWITEM(dialog, 121, 122, 0, 2);

SETBELOWITEM(dialog, 122, 123, 0, 2);

SETBELOWITEM(dialog, 123, 124, 0, 2);

SETBELOWITEM(dialog, 124, 125, 0, 2);

SETBELOWITEM(dialog, 125, 126, 0, 2);

SETBELOWITEM(dialog, 126, 127, 0, 2);

SETBELOWITEM(dialog, 127, 128, 0, 2);

{fields 2 }

SETRIGHTITEM(dialog, 117, 217, 2, 0);

SETRIGHTITEM(dialog, 118, 218, 2, 0);

SETRIGHTITEM(dialog, 119, 219, 2, 0);

SETRIGHTITEM(dialog, 120, 220, 2, 0);

SETRIGHTITEM(dialog, 121, 221, 2, 0);

SETRIGHTITEM(dialog, 122, 222, 2, 0);

SETRIGHTITEM(dialog, 123, 223, 2, 0);

SETRIGHTITEM(dialog, 124, 224, 2, 0);

SETRIGHTITEM(dialog, 125, 225, 2, 0);

SETRIGHTITEM(dialog, 126, 226, 2, 0);

SETRIGHTITEM(dialog, 127, 227, 2, 0);

SETRIGHTITEM(dialog, 128, 228, 2, 0);

{ the funky stuff: replaced by the above section }

{ SETRIGHTITEM(dialog, 117, 217, 2, 0);

SETBELOWITEM(dialog, 217, 218, 2, 0);

SETBELOWITEM(dialog, 218, 219, 2, 0);

SETBELOWITEM(dialog, 219, 220, 2, 0);

SETBELOWITEM(dialog, 220, 221, 2, 0);

SETBELOWITEM(dialog, 221, 222, 2, 0);

SETBELOWITEM(dialog, 222, 223, 2, 0);

SETBELOWITEM(dialog, 223, 224, 0, 2);

SETBELOWITEM(dialog, 224, 225, 0, 2);

SETBELOWITEM(dialog, 225, 226, 0, 2);

SETBELOWITEM(dialog, 226, 227, 0, 2);

SETBELOWITEM(dialog, 227, 228, 0, 2); }

Share this post


Link to post

That's waht happened.

Start by setting the last two parameters of SETBELOWITEM and SETRIGHTITEM to 0,0.

SETRIGHTITEM(dialog, #, #, 0, 0);

SETBELOWITEM(dialog, #, #, 0, 0);

The shift is additive. If you shift one control the other will automaticall move with it. If you want to move back to the start you have to shift the control in the negative direction.

Don't know what the control ID's are for the dialog but the best layout is to set all the controls on the left below each other then set the controls on the right of the control on the left.

Share this post


Link to post

Right. OK. I see, I see. Now I see.

I think I'll stay with classic dialogs. This one (27 text fields) would have taken me at max 15 minutes to create and any change of sequence or similar a couple of minutes.

Share this post


Link to post

I'd recomend learning and using the modern dialog interface. Beginning in 2010 many classic dialog functions will be marked obsolete and will stop working in 2011 or 2012.

Share this post


Link to post

Right. I just have to stop upgrading, then, and advice my users to do the same. I can't waste time for these mundane tasks when my Excel dialog builder generates fully-functional dialogs in a fraction of time. I only need them for obscure settings of my parametric objects.

Share this post


Link to post

This is ridiculous. The default vertical spacing for static text and fields is different and cannot be adjusted so that items would align vertically when using SETBELOWITEM.

On the left, there is a one pixel shift; on the right, zero. Neither is acceptable.

We have a perfectly good system that allows the programmer to control the location of each dialog element and that is going to be made obsolete and replaced by something that just does not work and in which the look is determined by NNA, not the programmer. Totally stupid.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×