I am experimenting with ComboBoxes at the moment, and seem
to be over-looking something... I can't seem to get a scroll bar
to allow me to choose the last 2 names in the example below:
TYPE UserInfoStruct
UserName AS ASCIIZ * 256
Password AS ASCIIZ * 256
END TYPE
GLOBAL UserInfo AS UserInfoStruct
CALLBACK FUNCTION OkButton
COMBOBOX GET TEXT CBHNDL, 1 TO UserInfo.UserName
CONTROL GET TEXT CBHNDL, 2 TO UserInfo.Password
DIALOG END CBHNDL
END FUNCTION
FUNCTION PBMAIN AS LONG
REGISTER DlgHandle AS LONG
LOCAL LogonInfo AS ASCIIZ * 256
DIM CBChoice(1 TO DATACOUNT) AS STRING
DATA User1, User2, User3, User4, User5, User6
FOR a& = 1 TO DATACOUNT
CBChoice(a&) = READ$(a&)
NEXT a&
DIALOG NEW %HWND_DESKTOP, "Logon",,, 200, 100 TO DlgHandle
CONTROL ADD COMBOBOX, DlgHandle, 1, CBChoice(), 2, 5, 196, 53, %CBS_DROPDOWNLIST
CONTROL ADD TEXTBOX, DlgHandle, 2, "", 2, 55, 196, 12, %ES_PASSWORD
CONTROL ADD BUTTON, DlgHandle, 3, "Logon", 75, 76, 30, 15, %BS_DEFAULT CALL OkButton
COMBOBOX SELECT DlgHandle, 1, 1
DIALOG SHOW MODAL DlgHandle
LogonInfo = "UserName: " + UserInfo.UserName + CHR$(13) + "Password: " + UserInfo.Password
MSGBOX LogonInfo, %MB_OK, "Logon Complete"
END FUNCTION
The ComboBox lists User1, 2, 3, and 4... I can't get it to
add a scrollbar to the other 2...
------------------
to be over-looking something... I can't seem to get a scroll bar
to allow me to choose the last 2 names in the example below:
TYPE UserInfoStruct
UserName AS ASCIIZ * 256
Password AS ASCIIZ * 256
END TYPE
GLOBAL UserInfo AS UserInfoStruct
CALLBACK FUNCTION OkButton
COMBOBOX GET TEXT CBHNDL, 1 TO UserInfo.UserName
CONTROL GET TEXT CBHNDL, 2 TO UserInfo.Password
DIALOG END CBHNDL
END FUNCTION
FUNCTION PBMAIN AS LONG
REGISTER DlgHandle AS LONG
LOCAL LogonInfo AS ASCIIZ * 256
DIM CBChoice(1 TO DATACOUNT) AS STRING
DATA User1, User2, User3, User4, User5, User6
FOR a& = 1 TO DATACOUNT
CBChoice(a&) = READ$(a&)
NEXT a&
DIALOG NEW %HWND_DESKTOP, "Logon",,, 200, 100 TO DlgHandle
CONTROL ADD COMBOBOX, DlgHandle, 1, CBChoice(), 2, 5, 196, 53, %CBS_DROPDOWNLIST
CONTROL ADD TEXTBOX, DlgHandle, 2, "", 2, 55, 196, 12, %ES_PASSWORD
CONTROL ADD BUTTON, DlgHandle, 3, "Logon", 75, 76, 30, 15, %BS_DEFAULT CALL OkButton
COMBOBOX SELECT DlgHandle, 1, 1
DIALOG SHOW MODAL DlgHandle
LogonInfo = "UserName: " + UserInfo.UserName + CHR$(13) + "Password: " + UserInfo.Password
MSGBOX LogonInfo, %MB_OK, "Logon Complete"
END FUNCTION
The ComboBox lists User1, 2, 3, and 4... I can't get it to
add a scrollbar to the other 2...
------------------
Comment