Skip to content

Cursor goes missing in notify* forms #114

@Etzeitet

Description

@Etzeitet

The forms provided by the notify, notify_yes_no, etc functions in utilNotify.py have an issue where the cursor disappears if you move away from the OK button.

It usually requires pressing Tab in order to get the focus back on to OK/Cancel.

This looks like a bug in the functions where the message is added to the Form object. To fix this, I had to override the function and change the F.add line to add editable=False:

def notify_yes_no(message, title="Message", form_color='STANDOUT', wrap=True, editw = 0,):
    message = _prepare_message(message)
    F   = YesNoPopup(name=title, color=form_color)
    F.preserve_selected_widget = True
    mlw = F.add(wgmultiline.Pager, editable=False)  # fix
    mlw_width = mlw.width-1
    if wrap:
        message = _wrap_message_lines(message, mlw_width)
    mlw.values = message
    F.editw = editw
    F.edit()
    return F.value

This would need fixing on each of the notify functions.

This project doesn't appear to be maintained much anymore, which is a shame, but hopefully this might help someone down the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions