Jump to content
Macro Express Forums

Multiple Choice width


Recommended Posts

I've been spending some time working thru issues on the Multiple Choice menu and now I'm working on size and column behavior so my macros will appear properly. The impedes was that my ME3 conversion made some inscrutable box sizes and I wanted to know how big to make things in cases where I am dynamically creating lists.

 

I have determined that regardless of how long any string is you put into the item text the display of that text is allocated a fixed width. Approx 228 pixels or 38 "O"s. "O" being the widest character, one can get many more "i"s. And vertically each row takes up 17p. Also I have determined that regardless of dialog box height up to 9 rows of information will appear in a single column and 10 or more will appear in two columns. Furthermore that the number of rows will be split in two, the remainder going to the first column. IE 13 items will result in 7 in the first row. I think that's all universal.

 

Now on my Vista system in order to prevent a horizontal scroll bar the dialog width should be 545p for single column (less than 10 items) and 562 for 2 columns. But it appears to be much less on a Windows 2003 system. But in the 2003 system the menu appears much more svelte.

 

My question is if the fatter borders in Vista are causing this and if this can be considered the worse case. My plan is to come up with an algorithm that calculates a multiple choice dialog box that's always 'just the right size. If I know the worse case I can set my sights on that.

Link to comment
Share on other sites

I've been spending some time working thru issues on the Multiple Choice menu and now I'm working on size and column behavior so my macros will appear properly. The impedes was that my ME3 conversion made some inscrutable box sizes and I wanted to know how big to make things in cases where I am dynamically creating lists.

 

<Gripe>

 

Cory, I came in here Saturday to write up a gripe about this exact same issue, (but got sidetracked).

 

The interface and mish-mash of governing logic behind the multiple choice dialog functions is confusing, to say the least. I have also had to create variables for the X, Y, W, and H. Not to mention the characters per line limit which is a real pain when you need to present choices collected from file sources that are potentally longer than what can be accommodated, requiring even more code!! Why are there even editable parameter values presented in this interface? At least 3.7 had made up for these flaws slightly with dynamic box sizes.

 

Sorry to be grumpy, but this is an issue for me because it neccessiates the need to create code to make this a presentable function so I, a macro author, don't end up with dysfunctional and unprofessional-looking interfaces.

 

If we MUST have dynamic columns in this dialog box, at least give us coders some control over how they present!

 

</Gripe>

Link to comment
Share on other sites

Let's move past your very valid gripe for a moment. I'm totally with you on the need for "Auto" to appear in the dimension fields.

 

Do you think I'm on the right track here? I think the logic is pretty sound regarding the number of columns given the number of rows and all that. I think at this point if I can determine what the worst case is for borders, I think it's Vista, I can make a fairly painless procedure for sizing.

 

If you ever set about making a subroutine for this let me know and we can work on it together. Right now I have to get something else done first.

Link to comment
Share on other sites

I have determined that regardless of how long any string is you put into the item text the display of that text is allocated a fixed width. Approx 228 pixels or 38 "O"s. "O" being the widest character, one can get many more "i"s.

I reckon W is wider than O, whether upper or lower case.

Link to comment
Share on other sites

I reckon W is wider than O, whether upper or lower case.

Good point. I haven't messed with fonts metrics for a long time but I was just thinking of a macro to determine display width. First off there's character width and luckily we only have one font so we could nail that down with some experimentation but then you have things like kerning for white space fill. A "T" and and "L" might have the same width but a series of 10 T's of L's can be wider than a series of "LTLTLTLTLT" where they nest. It just depends on how the GUI was written. But one could write a simplified routine that could determine if it's likely a string would go over budget on width.

 

But the next shoe to drop is what to do if it is too wide and it's from a source you can't control. I was thinking I could have a multiple choice that would show a menu item like 1 <value>, 2 ,<value>, 3 ,value>, and so on for each line and then pull up a text display box to the side of it with a much greater width displaying the entire text.

Link to comment
Share on other sites

Sorry for the above gripejack, and I have not yet had the 'opportunity' to work in Vista.

 

What about writing a macro that loops through dynamic Width parameter and text string multiple choice variable values and detects the state of the Multiple Choice Dialog Box results using pixel color or some other boolean value? It could write the results to a text file, resulting in a nice little accumulation of data that you can use in your formulas? Something like this would take me too long to write myself... so send me a copy!

 

Just an idea.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...