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.
menu lm
// m_response_edit is menu inherited from m_frame
int i
// In order to make keyboard shortcuts available, create a hidden menu
If Not IsValid(This.menuId) Then
// Instantiate the menu
This.ChangeMenu(m_response_edit)
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
Next
End if
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)
Good tip. I think I did this once.