Mark field as required
-
- Posts: 51
- Joined: Tue Mar 23, 2010 12:53 pm
- Contact:
Mark field as required
it is possible to Mark field as mandatory
similar to one of the example image
or
similar to one of the example image
or
Re: Mark field as required
Márcio, não entendi nada. Explique melhor, ou poste a sua dúvida no fivewin Brasil com mais detalhes, não sei porquê você posta dúvidas no forum em inglês? No forum em espanhol, mesmo que você poste a dúvida em Português, muitos vão entender.
Abs.
Regards, saludos.
Abs.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: Mark field as required
Use "CUEBANNER" clause with GET object
For use clause CUEBANNER, in you RC file, include Manifest.CUEBANNER "REQUIRED"
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: Mark field as required
Where do you put the "REQUIRED" ? I get a syntax error at compiling
This is from the sample Subscript0.prg
@ nRow, nCol GET aGets[ 1 ] VAR aData[ 1, 2 ] ;
PICTURE aData[ 1, 3 ] SIZE nWidth - nCol * 2, 15 PIXEL OF oDlg ;
COLOR nClrTxt, CLR_WHITE CUEBANNER aData[ 1, 1 ] BOTTOMBORDER ;
INFIELD INFONT oFontI INCLRTXT CLR_GRAY ;
INCLRBORDER { | o | if( o:lFocused, o:nInClrLineB, nClrBox ) } ;
INSEPH 1 INSEPV 1 ; //INWHPEN 2 ;
INCLRLINEDIS CLR_BLUE DYNAMIC ; //GROUP
INERROR "EMPTY VALUE NOT VALID" ;
INCLRERROR CLR_BLUE, CLR_HGRAY
This is from the sample Subscript0.prg
@ nRow, nCol GET aGets[ 1 ] VAR aData[ 1, 2 ] ;
PICTURE aData[ 1, 3 ] SIZE nWidth - nCol * 2, 15 PIXEL OF oDlg ;
COLOR nClrTxt, CLR_WHITE CUEBANNER aData[ 1, 1 ] BOTTOMBORDER ;
INFIELD INFONT oFontI INCLRTXT CLR_GRAY ;
INCLRBORDER { | o | if( o:lFocused, o:nInClrLineB, nClrBox ) } ;
INSEPH 1 INSEPV 1 ; //INWHPEN 2 ;
INCLRLINEDIS CLR_BLUE DYNAMIC ; //GROUP
INERROR "EMPTY VALUE NOT VALID" ;
INCLRERROR CLR_BLUE, CLR_HGRAY
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
-
- Posts: 51
- Joined: Tue Mar 23, 2010 12:53 pm
- Contact:
Re: Mark field as required
Hello
I would like something similar, indicating that the field has to be filled in, as Indicated in red with (*)
Look
or this way
I would like something similar, indicating that the field has to be filled in, as Indicated in red with (*)
Look
or this way
-
- Posts: 51
- Joined: Tue Mar 23, 2010 12:53 pm
- Contact:
Re: Mark field as required
karinha wrote:Márcio, não entendi nada. Explique melhor, ou poste a sua dúvida no fivewin Brasil com mais detalhes, não sei porquê você posta dúvidas no forum em inglês? No forum em espanhol, mesmo que você poste a dúvida em Português, muitos vão entender.
Abs.
Regards, saludos.
I already posted on the brazil forum, but I had to modify the entire GET class, I didn't think it would be feasible.
The brazil forum is slow, almost stopping.
(Já postei no forum brasil, mas tinha que modificar classe GET toda, não achei que seria viavel.
O forum do brasil tá devagar, quase parando.)
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Mark field as required
Dear Marc,
I think Cristobal means this way:
@ nRow, nCol GET aGets[ 1 ] VAR aData[ 1, 2 ] ;
PICTURE aData[ 1, 3 ] SIZE nWidth - nCol * 2, 15 PIXEL OF oDlg ;
COLOR nClrTxt, CLR_WHITE CUEBANNER "REQUIRED" BOTTOMBORDER ;
INFIELD INFONT oFontI INCLRTXT CLR_GRAY ;
INCLRBORDER { | o | if( o:lFocused, o:nInClrLineB, nClrBox ) } ;
INSEPH 1 INSEPV 1 ; //INWHPEN 2 ;
INCLRLINEDIS CLR_BLUE DYNAMIC ; //GROUP
INERROR "EMPTY VALUE NOT VALID" ;
INCLRERROR CLR_BLUE, CLR_HGRAY
I think Cristobal means this way:
@ nRow, nCol GET aGets[ 1 ] VAR aData[ 1, 2 ] ;
PICTURE aData[ 1, 3 ] SIZE nWidth - nCol * 2, 15 PIXEL OF oDlg ;
COLOR nClrTxt, CLR_WHITE CUEBANNER "REQUIRED" BOTTOMBORDER ;
INFIELD INFONT oFontI INCLRTXT CLR_GRAY ;
INCLRBORDER { | o | if( o:lFocused, o:nInClrLineB, nClrBox ) } ;
INSEPH 1 INSEPV 1 ; //INWHPEN 2 ;
INCLRLINEDIS CLR_BLUE DYNAMIC ; //GROUP
INERROR "EMPTY VALUE NOT VALID" ;
INCLRERROR CLR_BLUE, CLR_HGRAY
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: Mark field as required
Ok, Ik thougth that it was a Method/Data that would put a item like (*) insite the get so show it is a required field.Antonio Linares wrote:Dear Marc,
I think Cristobal means this way:
@ nRow, nCol GET aGets[ 1 ] VAR aData[ 1, 2 ] ;
PICTURE aData[ 1, 3 ] SIZE nWidth - nCol * 2, 15 PIXEL OF oDlg ;
COLOR nClrTxt, CLR_WHITE CUEBANNER "REQUIRED" BOTTOMBORDER ;
INFIELD INFONT oFontI INCLRTXT CLR_GRAY ;
INCLRBORDER { | o | if( o:lFocused, o:nInClrLineB, nClrBox ) } ;
INSEPH 1 INSEPV 1 ; //INWHPEN 2 ;
INCLRLINEDIS CLR_BLUE DYNAMIC ; //GROUP
INERROR "EMPTY VALUE NOT VALID" ;
INCLRERROR CLR_BLUE, CLR_HGRAY
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
- Rick Lipkin
- Posts: 2668
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Mark field as required
Why not use a valid clause at the end of the get statement .. like
Rick Lipkin
Code: Select all | Expand
REDEFINE GET oActive var cActive ID 143 Font oFontB of oGrps Valid _ChkField( cActive,oActive) PICTURE "@!" UPDATE
//-------------------
Static Func _CHkField( cActive,oActive )
Local Saying
If cActive = " "
Saying := "Sorry .. the Field ACTIVE is a Required field"+CRLF
Saying += "and Can Not be left BLANK"
MsgInfo( Saying )
oActive:SetFocus()
Return(.f.)
Else
Return(.t.)
Endif
// end
Rick Lipkin
Re: Mark field as required
Master Navarro, I never managed to make this CUEBANNER command work properly.cnavarro wrote:Use "CUEBANNER" clause with GET objectFor use clause CUEBANNER, in you RC file, include Manifest.CUEBANNER "REQUIRED"
Maestro Navarro, nunca logré hacer funcionar correctamente este comando CUEBANNER.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
-
- Posts: 51
- Joined: Tue Mar 23, 2010 12:53 pm
- Contact:
Re: Mark field as required
hello
Thanks for the answer, but I wanted it to be something Visual
when looking at the dialog, already identify which fields are mandatory
Sample
http://fivewin.com.br/applications/core ... .php?id=67
Link Forum Brazil
http://fivewin.com.br/index.php?/topic/ ... ent-263637
Thanks for the answer, but I wanted it to be something Visual
when looking at the dialog, already identify which fields are mandatory
Sample
http://fivewin.com.br/applications/core ... .php?id=67
Link Forum Brazil
http://fivewin.com.br/index.php?/topic/ ... ent-263637
Re: Mark field as required
Aunque hasta ahora no he entendido exactamente qué quiere hacer Márcio, me gustó mucho esta idea de Mister Rick Lipkin.
Although until now I haven't understood exactly what Márcio wants to do, I really liked this idea from Mister Rick Lipkin.
Regards, saludos.
Although until now I haven't understood exactly what Márcio wants to do, I really liked this idea from Mister Rick Lipkin.
Code: Select all | Expand
// C:\FWH..\SAMPLES\RICKBAN.PRG -> By Rick Lipkin
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, oBtn, oActive, cActive, oFont
cActive := SPACE(40) // "TESTE DE CUEBANNER "
SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE DIALOG oDlg FROM 5, 5 TO 25, 40 TITLE "Testing CUEBANNER" FONT oFont
@ 2, 2 GET oActive VAR cActive PICTURE "@!" OF oDlg SIZE 100, 12 UPDATE ;
VALID( ChkField( cActive, oActive ) )
@ 06, 08 BUTTON "&Quit" OF oDlg SIZE 40,12 ACTION( oDlg:End() ) CANCEL
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETURN NIL
FUNCTION CHkField( cActive, oActive )
LOCAL Saying
IF cActive = " "
Saying := "Sorry... the Field ACTIVE is a Required field" + CRLF
Saying += "and Can Not be left BLANK"
MsgInfo( Saying )
// oActive:VARPUT( "Field ACTIVE is a Required" )
// oActive:Refresh()
oActive:SetFocus()
RETURN( .F. )
ELSE
RETURN( .T. )
ENDIF
RETURN( .T. )
// FIN / END
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: Mark field as required
What he want is quit good and should be a thing inside FWH. It simple give a visual look (red stars) that these fields are needed.
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
-
- Posts: 51
- Joined: Tue Mar 23, 2010 12:53 pm
- Contact:
Re: Mark field as required
exactly what I need
Re: Mark field as required
Intenta ahora Márcio. Tente agora Márcio. Se não entender, pergunte.
https://mega.nz/file/IB8BjAgD#rUUqVQY6q ... OuxylKQabw
abs.
Regards, saludos.
https://mega.nz/file/IB8BjAgD#rUUqVQY6q ... OuxylKQabw
abs.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341