Textbox Password Property ...
Moderator: Rathinagiri
Textbox Password Property ...
Dear Masters,
The Password property of the TextBox control can be set as .T. or .F. when we defined/designed...
But i get an error saying syntax error while tried to change :
Main.txtPass.Password := .T.
or are there any other ways to alter the property ?
TIA
best rgds,
Chang
The Password property of the TextBox control can be set as .T. or .F. when we defined/designed...
But i get an error saying syntax error while tried to change :
Main.txtPass.Password := .T.
or are there any other ways to alter the property ?
TIA
best rgds,
Chang
Just Hmg It !
Re: Textbox Password Property ...
No entiendo el porque quieres alterar esta propiedad, o es Texbox "normal" ó para "Password".
Creo que solo lo puedes hacer al momento de la definición.
En la lista de propiedades no aparece esta propiedad.
---------------------------------------------------------------------------------------------------------------
I do not understand why you want to alter this property or is "normal" or to "Password" TexBox.
I think you can only do when the definition.
In the list of properties this property does not appear.
Creo que solo lo puedes hacer al momento de la definición.
En la lista de propiedades no aparece esta propiedad.
---------------------------------------------------------------------------------------------------------------
I do not understand why you want to alter this property or is "normal" or to "Password" TexBox.
I think you can only do when the definition.
In the list of properties this property does not appear.
Code: Select all
DEFINE TEXTBOX <Controlname>
........
PASSWORD <lValue>
........
END TEXTBOX
Properties:
- Value
- Enabled
- Visible
- Row
- Col
- Width
- Height
- FontName
- FontSize
- FontBold
- FontItalic
- FontUnderline
- FontStrikeout
- ToolTip
- BackColor
- FontColor
- DisabledBackColor
- DisabledFontColor
- CaretPos
- ReadOnly
- Name (R)
- TabStop (D)
- Field (D)
- Parent (D)
- InputMask (D)
- Format (D)
- MaxLength (D)
- RightAlign (D)
- HelpId (D)
- CaseConvert (D)
- DataType (D)
D: Available at control definition only
R: Read-Only
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: Textbox Password Property ...
Thks for your info, but...
then i need to display the password entered at the textbox...
my idea is to just set the password property to .F.
and when the checkbox is unchecked... then
Main.txtPass.Password := .T.
but it wont compile.....
pls advise n TIA
best rgds
Chang
so... if the checkbox is checked... then i need to display the password entered at the textbox...
my idea is to just set the password property to .F.
and when the checkbox is unchecked... then
Main.txtPass.Password := .T.
but it wont compile.....
pls advise n TIA
best rgds
Chang
Just Hmg It !
- serge_girard
- Posts: 3169
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Textbox Password Property ...
Chang,
I believe it has been hardcoded in order to avoid to see passwords.
Serge
I believe it has been hardcoded in order to avoid to see passwords.
Serge
There's nothing you can do that can't be done...
Re: Textbox Password Property ...
Against creating checkbox Show password and display eneted password in Password field, you can create something like in widows 8 - picture with eye, when you go to this picture, the password will show in balloon.
Re: Textbox Password Property ...
Hi Chang,hmgchang wrote:...
then i need to display the password entered at the textbox...
my idea is to just set the password property to .F.
and when the checkbox is unchecked... then
Main.txtPass.Password := .T.
Please be so kind to review the following simple sample:
Code: Select all
/*
* MINIGUI - Harbour Win32 GUI library Demo
*
*/
#include "minigui.ch"
FUNCTION Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 300 ;
TITLE "MiniGUI Password Demo" ;
MAIN ;
FONT "Arial" SIZE 10
MakePasswordControl( 'Secret', .T. )
@ 40,10 CHECKBOX Check_1 CAPTION 'Show password' ;
VALUE .F. ;
WIDTH 120 ;
TOOLTIP 'CheckBox Control' ;
ON CHANGE MakePasswordControl( Form_1.Text_pass.Value, ! Form_1.Check_1.Value )
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
RETURN Nil
FUNCTION MakePasswordControl( cPass, lShow )
IF IsControlDefined (Text_pass, Form_1) == .T.
Form_1.Text_pass.Release
ENDIF
DEFINE TEXTBOX Text_pass
PARENT Form_1
ROW 10
COL 10
VALUE cPass
PASSWORD lShow
FONTNAME "Arial"
FONTSIZE 10
TOOLTIP 'Password TextBox'
MAXLENGTH 16
END TEXTBOX
RETURN lShow
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Textbox Password Property ...
Hi Chang,
as already stated, PASSWORD property isn't available/changeable at runtime.
However you can achieve what you're looking for with various tricks like this one posted by Grigory.
below is an other approach which you might consider.
rgrds,
Pete
as already stated, PASSWORD property isn't available/changeable at runtime.
However you can achieve what you're looking for with various tricks like this one posted by Grigory.
below is an other approach which you might consider.
Code: Select all
#include "minigui.ch"
FUNCTION Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 120 ;
TITLE "Show/hide Password" ;
MAIN ;
FONT "Arial" SIZE 10
DEFINE TEXTBOX Pass_Shown
PARENT Form_1
ROW 30
COL 70
VALUE ""
FONTNAME "Arial"
FONTSIZE 10
MAXLENGTH 16
INVISIBLE .T.
END TEXTBOX
DEFINE TEXTBOX Pass_Hidden
PARENT Form_1
ROW 30
COL 70
VALUE ""
PASSWORD .T.
FONTNAME "Arial"
FONTSIZE 10
TOOLTIP 'Password TextBox'
MAXLENGTH 16
END TEXTBOX
@ 33,200 CHECKBOX Check_1 CAPTION 'Show password' ;
VALUE .F. ;
WIDTH 120 ;
TOOLTIP 'CheckBox Control' ;
ON CHANGE ShowPassWord( This.Value )
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
RETURN Nil
PROCEDURE ShowPassWord( lShow )
IF lShow
Form_1.Pass_Shown.Value := Form_1.Pass_Hidden.Value
DoMethod( 'Form_1', 'Pass_Hidden', 'Hide' )
DoMethod( 'Form_1', 'Pass_Shown', 'Show' )
ELSE
Form_1.Pass_Hidden.Value := Form_1.Pass_Shown.Value
DoMethod( 'Form_1', 'Pass_Hidden', 'Show' )
DoMethod( 'Form_1', 'Pass_Shown', 'Hide' )
ENDIF
RETURN
Pete
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Textbox Password Property ...
Hola PeteGW,
Existe la propiedad:
INVISIBLE .T. en HMG? que versión usas?
Saludos
Existe la propiedad:
INVISIBLE .T. en HMG? que versión usas?
Saludos
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Textbox Password Property ...
Hola Chang,
Yo lo hago así:
Saludos
Yo lo hago así:
Code: Select all
/*
* MINIGUI - Harbour Win32 GUI library Demo
*
*/
#include "minigui.ch"
FUNCTION Main
LOCAL cPass := "Secret"
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 300 ;
TITLE "MiniGUI Password Demo" ;
MAIN ;
FONT "Arial" SIZE 10
DEFINE TEXTBOX Text_pass
PARENT Form_1
ROW 10
COL 10
VALUE cPass
PASSWORD .T.
FONTNAME "Arial"
FONTSIZE 10
TOOLTIP 'Password TextBox'
MAXLENGTH 16
END TEXTBOX
DEFINE TEXTBOX Text_NoPass
PARENT Form_1
ROW 10
COL 10
VALUE cPass
PASSWORD .F.
FONTNAME "Arial"
FONTSIZE 10
TOOLTIP 'Password TextBox'
MAXLENGTH 16
END TEXTBOX
@ 40,10 CHECKBOX Check_1 CAPTION 'Show password' ;
VALUE .F. ;
WIDTH 120 ;
TOOLTIP 'CheckBox Control' ;
ON CHANGE Cambia(This.Value)
END WINDOW
Form_1.Text_NoPass.Hide
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
RETURN Nil
FUNCTION Cambia(lValue)
IF lValue == .F.
Form_1.Text_NoPass.Hide
Form_1.Text_pass.Show
ELSE
Form_1.Text_pass.Hide
Form_1.Text_NoPass.Show
ENDIF
RETURN
Last edited by Javier Tovar on Thu Nov 27, 2014 8:38 pm, edited 2 times in total.
Re: Textbox Password Property ...
Hi HavierJavier Tovar wrote:Hola PeteGW,
Existe la propiedad:
INVISIBLE .T. en HMG? que versión usas?
Saludos
INVISIBLE property last time i looked at 3.3.1. docs, was there. You mean it doesn't work? ( I didn't test with HMG, though)
I do use both HMG & Mingui extended.
PS. btw, your sample you posted needs some edit. check it and i'm sure you'll find what i mean.
rgrds,
Pete