- 
                            
                                
                            
                            Julian I.
                         - PowerBuilder
 - Friday, 29 January 2021 12:08 PM UTC
 
Is there any method to change the menu of a window, for its original menu?
I am testing, but the changemenu() fails
// Reestablecemos el menú de la hoja activa
lw_sheet = w_frame.GetActiveSheet()
if isValid(lw_sheet) then    
    // Test: Pare eliminar el Menú (asignamos un menú Vacio)
    li_ret = lw_sheet.changemenu(m_vacio) --> Returns 1
    // Obtenemos el menú original de la ventana, puesto que el change menú lo cambia   
    ls_ventana = lw_sheet.className()
    lw_temp = create using ls_ventana
    ls_menu_original = lw_temp.MenuName
    if isNull(ls_menu_original) then ls_menu_original = ""
    destroy(lw_temp)
    // Reestablecer menú original creado dynamicamente
    lm_menu = create using ls_menu_original
    li_ret = lw_sheet.changemenu(lm_menu) --> Returns -1
    
end if
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.