Beijer Electronics (formerly QSI Corporation)
http://www.qsiforums.com/

Edit Box: Multiline, password
http://www.qsiforums.com/viewtopic.php?f=6&t=4467
Page 1 of 1

Author:  kkwon [ Mon Jun 18, 2012 6:16 am ]
Post subject:  Edit Box: Multiline, password

Hi,
Would like to have an password change function where the current password and new password are entered.
Is it possible to configure an edit box to have two lines and password mode?
CoreEditBox has boxType as editBox_type where eb_Password and eb_Multiline are possible values, but is it possible to configure it having both eb_Password and eb_Multiline ?

Author:  Ron L. [ Mon Jun 18, 2012 8:16 am ]
Post subject:  Re: Edit Box: Multiline, password

Try putting a LabelV2 object in front of the EditBox (covering it) with the same width and height as the EditBox. Then put this code in the EditBox.

Code:
init boxtype := eb_multilinescroll

func OnChange()
    dim i as integer
    dim txt as string

    Redim(txt, Len(editbox_1.Value))
    for i = 0 to Len(txt)-1
        if editbox_1.Value[i] == '\n' or editbox_1.Value[i] == '\r' then
            txt[i] := '\n'
        else
            txt[i] := '*'
        endif
    next
    label_1.value = txt
endfunc

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/