Skip to content

VBA.InputBox's ok button should be BS_DEFPUSHBUTTON directly #2312

@Kr00l

Description

@Kr00l

Describe the bug
The ok button of the tB InputBox does not show "directly" as being the default button.

To Reproduce
Call VBA.InputBox() with any args

Expected behavior
The default button shall show blue immediately.

Screenshots
Image

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]
  • twinBASIC compiler version [e.g. 0.9.1111]

Additional context
Here is the VB6 dialog template which has BS_DEFPUSHBUTTON at creation already.

4031 DIALOG 55, 22, 238, 74
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 9, "MS Shell Dlg"
{
   CONTROL "", 4901, STATIC, SS_LEFT | SS_NOPREFIX | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 6, 178, 45 
   CONTROL "", 4900, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 6, 56, 226, 12 
   CONTROL "OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 192, 6, 40, 14 
   CONTROL "Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 192, 23, 40, 14 
   CONTROL "&Help", 4902, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 192, 40, 40, 14 
}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions