Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

PowerBuilder dynamic menus

Question:
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.

Answer:
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.

 

 

Sitemap