We help IT Professionals succeed at work.

Displaying many menu items

I have an application that needs to display all the files in a particular directory in a popup menu. A problem occurs when there are lots of files in the directory, because there is not enough room on the screen to display all of them.

Is there any way of:
a) making the menu display on more than one column (like the windows start menu) - preferred
b) working out how many items can be displayed in one column so I can split the menu up

Watch Question

I usually don't like answers in this forum that suggest that you take another approach.  If someone asks a question thaty should get an answer, not be told to do something else.  In this case, however, I can't help myself.

What is the reason why this has to be done with a pop up menu?  It seems like the worst possible solution to the problem.  Wouldn't some sort of dialog box (the Open File common dialog comes to mind) be better?
you will find what you need here at the link below. this shows you how to create a multi-column menu. as for how manu items in one column - that's something that will change depending on the persons screen size and if they have the application maximized or not. you'll have to do your own code for that.



The reason for the bad approach is unavoidable really as I am converting an application running on an Acorn computer to a PC! so to keep things consistent - I need to keep the same popup menu format!


This does the job - thanks


The accepted answer doesn't actually work for popup menus! but never mind

Explore More ContentExplore courses, solutions, and other research materials related to this topic.