Getting a reference to the window’s menu is easily accomplished using the window’s MenuId property. But what if you want to get a reference to a submenu and all you have is a string with the menu’s name? This following function will do the trick: Continue reading →
Aron wanted a datawindow to be able have all the standard windows shortcut key “<cntl> A” for “Select All”.He was using the PFC multi row select, so he was able to give the standard <Cntl> and <Shift> extended selection.
His solution was to use a hidden menu where the Select All menu item is triggered by the shortcut key “<Cntl> A”.This problem was complicated by the fact thatthe window was a Response window, and needed to have the menu assignment done dynamically.Here is the code he put in the PreOpen Event.
// m_response_edit is menu inherited from m_frame
// In order to make keyboard shortcuts available, create a hidden menu
If Not IsValid(This.menuId) Then
// Instantiate the menu
lm = This.menuId
// Hide the menu and it's first level items
lm.visible = False
For i = 1 To UpperBound(lm.item)
lm.item[i].visible = False
Over the years of being a PowerBuilder developer, I have recorded many things I have learned and I may need to refer to in the future. Some of these discoveries date back to PowerBuilder 4 and may not be relavent with the later versions of PB
I am still in the process of transferring all my notes. (Hey, I have other things to do)