RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Feb 2, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

PowerBuilder dynamic menus

We want to create menus dynamically where we store the menu items in a table. While running the application, we want to read the values from the table and build the menu dynamically.

This is not possible using the standard PowerBuilder menu objects. There are several workarounds to the problem.

The first is to use a tree control for naviagation. You could also use a listview with icons representig the options the user can select.

The last option, which is the option I have personally used is to build fake menus with a window and a custom control. I used the datawindow control with each row representing an item in the menu. I then used lines to draw a 3D edge and dynamically resized the control based on the size of the widest text and the number of rows in the datawindow. It was very effective and you could not tell the difference between the fake and a real menu.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date