topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
set filter con xbrowse da error | Gracias por la sugerencia, la verdad que no se me había ocurrido.Voy a probar.Ricardo |
set filter con xbrowse da error | Eduardo, el error persiste, pude ver que el valor de bFilter es lógico y al dejar la función como está da error porque intenta evaluar algo que no es bloque de código, le hice esta modificación y me está funcionando aparentemente.METHOD DelRepos() CLASS TXBrowse local lRepos := .f. local cFilter, bFilter if ::nDataType == DATATYPE_RDD if ::nLen > 0 if Set( _SET_DELETED ) .and. ( ::cAlias )->( Deleted() ) ( ::cAlias )->( dbSkip( 1 ) ) if ( ::cAlias )->( eof() ) ( ::cAlias )->( DbGoBottom() ) endif lRepos := .t. elseif ! Empty( cFilter := ( ::cAlias )->( dbFilter() ) ) bFilter := ( ::cAlias )->( &cFilter )//Modificación if Valtype(bfilter)="C" if &bFilter ( ::cAlias )->( dbSkip( 1 ) ) if ( ::cAlias )->( eof() ) ( ::cAlias )->( DbGoBottom() ) endif lRepos := .t. endif elseif valtype(bfilter)="L" if bFilter ( ::cAlias )->( dbSkip( 1 ) ) if ( ::cAlias )->( eof() ) ( ::cAlias )->( DbGoBottom() ) endif lRepos := .t. endif elseif valtype(bFilter)="B"//Fin de modificación if ( ::cAlias )->( Eval( bFilter ) ) ( ::cAlias )->( dbSkip( 1 ) ) if ( ::cAlias )->( eof() ) ( ::cAlias )->( DbGoBottom() ) endif lRepos := .t. endif* endif endif endif endifreturn lRepos |
set filter con xbrowse da error | Ricardo,usando: SET FILTER TO Customer->Married que es un campo lógico, el ejemplo que te hemos proporcionado funciona correctamente, sin necesidad de cambiar nada en la Clase TXbrowse. |
set filter en wbrowse | Quiero implementar un filtro en un browse, el mismo esta declarado como:REDEFINE LISTBOX oLbx FIELDS (oStock:calias)->remito,(oStock:calias)->tipo,(oStock:calias)->trem,transform((oStock:calias)->fecha,"@d"),; etc etcel filtro tiene que ser del campo (oStock:calias)->tipoY no puedo hacerlo funcionar, necesito filtrar los que datos en que este campo esten vaciosHice lo siguienteolbx:setfilter(oStock:tipo, "","")olbx:refresh()el error que me tira es el siguiente Error description: Error BASE/1003 Variable does not exist: XEn ese campo especifico con una "X" si está marcado y vacio si esta libreGracias |
set filter muy lento con muchos registros | Hasta ahora me funciona bien un listbox de una tabla que esta con set filter bajo un criterio de busqueda, pero en red de area local y arriba de 1000 registros la cosa se pone muy lenta, habrá la forma de que un listbox muestre la información desde una tabla de memoria u otra forma de acelerar el proceso??
gracias desde ya por sus comentarios |
set filter muy lento con muchos registros | Para red local y un tamaño medio de registros mejor te olvidas de set filter, pues es extremadamente lento. Yo utilizo índices CDX con scopes y es inmediato con miles de registros y en red local. |
set filter muy lento con muchos registros | los filtros con ADS , son rapidos. |
set filter muy lento con muchos registros | +1
CDX + scopes seria tu solucion mas facil y rapida.
Saludos |
set filter muy lento con muchos registros | olá,
veja o método :SetFilter() da classe Listbox (WBrowse)
ele filtra os registros no Listbox baseado em índices existentes |
set filter muy lento con muchos registros | Yuri podrías poner un pequeño ejemplo
Gracias |
set filter muy lento con muchos registros | veja na pasta samples:
..\samples\gallery\onemany\onemany.prg |
set filter muy lento con muchos registros | Hola,
También puedes utilizar Scopes con indices NTX:
ORDSCOPE(0,Desde) // inicio
ORDSCOPE(1,Hasta) // final
dbgotop()
Un saludo
Ernesto |
set filter muy lento con muchos registros | A mí me funciona bastante rápido con tablas de hasta 4.000 registros crear un indice en memoria:
[code=fw:3fnexi4e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Art->Art_Cod + Art->Art_Nom <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"TEMP"</span> <span style="color: #00C800;">for</span> &<span style="color: #000000;">(</span>cCondicion<span style="color: #000000;">)</span> MEMORY</div>[/code:3fnexi4e]
Saludos |
set font using TextOut or ExtTextOut | I need to "paint" text "over" a bitmap.
Using the tsay() classes I get white background. If I use the TextOut functions I can successfully paint my text. My question is, I want to control the font before I TextOut.
How can I do this? |
set font using TextOut or ExtTextOut | Don,
have a look (as an example) at window.prg:
[code=fw:9hm71bbz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> ShowToolTip<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TWindow</div>[/code:9hm71bbz]
EMG |
set font using TextOut or ExtTextOut | Don,
[img:1ctv37u0]http://www.pflegeplus.com/IMAGES/Textout1.jpg[/img:1ctv37u0]
External font- and text-define from multiline gets
[img:1ctv37u0]http://www.pflegeplus.com/IMAGES/Textout2.jpg[/img:1ctv37u0]
The code-part, extracted from the tool :
( there is still more included in the function, it is just the basic to understand )
[code=fw:1ctv37u0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CL_TXT<span style="color: #000000;">(</span> hMemDC <span style="color: #000000;">)</span> <span style="color: #B900B9;">// image hDC</span><br /><span style="color: #00C800;">LOCAL</span> hOldFnt := SelectObject<span style="color: #000000;">(</span> hMemDC, oFont:<span style="color: #000000;">hFont</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// selected font</span><br /><span style="color: #00C800;">LOCAL</span> cText<span style="color: #000000;">[</span><span style="color: #000000;">20</span><span style="color: #000000;">]</span>, I, nCount <span style="color: #B900B9;">// Line-counter</span><br /><br />SetBkMode<span style="color: #000000;">(</span> hMemDC, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <br />SetTextColor<span style="color: #000000;">(</span> hMemDC, nPenColor <span style="color: #000000;">)</span> <span style="color: #B900B9;">// selected fontcolor</span><br /><br /><span style="color: #B900B9;">// multiline get </span><br />nCount := StrCharCount<span style="color: #000000;">(</span> cFreetext2, CRLF <span style="color: #000000;">)</span><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCount<br /> cText<span style="color: #000000;">[</span>I<span style="color: #000000;">]</span> := STRTOKEN<span style="color: #000000;">(</span> cFreetext2, I, CRLF <span style="color: #000000;">)</span><br /><span style="color: #00C800;">NEXT</span><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCount<br /> TextOut<span style="color: #000000;">(</span> hMemDC, nTop, nLeft, cText<span style="color: #000000;">[</span>I<span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <br /> nTop := nTop - nFontheight <span style="color: #B900B9;">// draw multilines using Font-height</span><br /><span style="color: #00C800;">NEXT</span><br /><br />DeleteObject<span style="color: #000000;">(</span> hOldFnt <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /> </div>[/code:1ctv37u0] |
set font using TextOut or ExtTextOut | [quote="don lowenstein":3k7ozovr]I need to "paint" text "over" a bitmap.
Using the tsay() classes I get white background. [/quote:3k7ozovr]
FWH 14.04 fixes the problem. |
set index to... | Hello,Using: SET INDEX TO &cDbfName, returns run time error: Open error stack calls: OrdListAdd(0) I'm using dbf / cdx.What should I change? (I'm using the same function for opening ordered dbf in my clipper / xBase++ applications)Thanks,Moshe Yarden |
set index to... | Moshe,Try it this way:SET INDEX TO ( CurDir() + "\" + cDbfName ) |
set index to... | Antonio,Thanks.I have tried you suggestion, and many other different ways, with no success.The USE do finds the file. The problem is just with SET INDEX.Do you have any sample uses SET INDEX?Regards,Moshe Yarden |
set index to... | Moshe,Are you testing it on the emulator or on the real device ? Please review fwppc\samples\TestBrwS.prg |
set index to... | Antonio,Thanks. It is working now.I'm using it on the emulator. However, I think that the reason has to do with the the ... VIA "DBFCDX" .I did try it with: DbUseArea( .T., "DBFCDX", cDbfName, @cAlias, .F., )However I didn't call: REQUEST DBFCDXNow it is ok.Thanks again,Moshe Yarden |
set index to... | Moshe,glad to know it is working fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
set key not run on win 10 ? | I have
SetKey( VK_F8, {||oApp():HidePanelLeft(oApp():oSplit)} )
and not run on win 10 why ?
on w7 run ok
do you Know alternative ? |
set key not run on win 10 ? | This works fine for me under Win10:
[code=fw:jysxx399]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oWnd<br /><br /> SETKEY<span style="color: #000000;">(</span> VK_F2, <span style="color: #000000;">{</span> || <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Hello!"</span> <span style="color: #000000;">)</span><span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> oWnd<br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> oWnd<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span></div>[/code:jysxx399]
Maybe you are doing your SET KEY before oApp is defined?
The other issue might be function keys with dual options. On my laptop you have to press the [fn][F2] to get the assignment above because there are other default actions for the button keys. Probably since it is a laptop. |
set message to | Using a set message to oWnd with a variable in the message. When the variable changes the message changes however when I mouse over the message the variable reverts back to the old variable. When I no longer mouse over it the goes to the new variable. How do I prevent it from reverting to the old variable when I mouse over the message? |
set message to | Try
[code=fw:zu7kc97a]<div class="fw" id="{CB}" style="font-family: monospace;">oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">cMsgDef</span> = <span style="color: #ff0000;">"Changed"</span></div>[/code:zu7kc97a]
EMG |
set message to | Harvey,
This is a strange issue. I have dealt with it before and I never quite understood it. There actually two messages--I think one is supposed to be a temp message that is displayed during an activity, and the other is the previous message which is then displayed again after the activity.
This is from my notes:
----------------
The class is stange in that it contains two message vars, ::cMsg and ::cMsgDef. Here is how I got it to work:
oWnd:oMsgBar:cMsgDef:="xxx"
oWnd:oMsgBar:setMsg("yyy")
You must do both things. The message displayed is "xxx". If you don't pass something in setMsg() nothing happens, but the string you pass is not the one that is displayed.
------------
Regards,
James |
set message to | James and Enrico:
This is the code I got working. Needed to set the set message before anything worked.
Also if i added 2007 to the set message it display the old variables when I moused over.
[code=fw:2g2nych8]<div class="fw" id="{CB}" style="font-family: monospace;"> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">of</span> oWnd1 <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE,CLR_BLUE NOINSET <span style="color: #B900B9;">//DATE CLOCK </span><br /> <br /> oWnd1:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">DateOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd1:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">clockOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> oWnd1:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">cMsgDef</span> := <span style="color: #ff0000;">"YOU ARE WORKING ON ENTITY NO. "</span> +<span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>GLD,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">", "</span>+ALLTRIM<span style="color: #000000;">(</span>MCOMPNAME<span style="color: #000000;">)</span> <br /> oWnd1:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">setMsg</span><span style="color: #000000;">(</span><span style="color: #ff0000;">""</span><span style="color: #000000;">)</span></div>[/code:2g2nych8]
But it works fine just need to give up the theme on the bar.
Thank you both. |
set message to | Harvey,
>But it works fine just need to give up the theme on the bar.
So, it sounds like there may be a bug when using themes?
James |
set message to | I assume so. as soon as 2007 is added to the set message it reverts to the old variable on the mouse over. |
set message to | I suggest trying this sample program to change the default message. This works correctly and the same way whether Themed or not and whether 2007 style is used or not.
[code=fw:abmg3da1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> ownd<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> @ <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">'ReviseMsg'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">'Click to change MessageBar Default Message'</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">cMsgDef</span> := <span style="color: #ff0000;">'Revised Message'</span>, oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">'Initial Message'</span> <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:abmg3da1] |
set message vs statusbar | tengo una ventana con un browse y defino una barra de mensajes ....
cuando hago una busqueda incremental del browse me muestra lo que escribo en la barra de mensajes, y el browse se mueve automaticamente, todo esto funciona ok, pues resulta que quiero hacer lo mismo pero en lugar de usar la set message quiero usar la statusbar y no he podido, alguna pista de como hacerlo?
Gracias
Pako |
set message vs statusbar | se me olvido aclarar que la uso en una MDICHILD,aki dejo el codigo
DEFINE WINDOW oWndHija MDICHILD OF oWnd TITLE "Módulo de Control de Empresas"
DEFINE STATUSBAR oStatusBar PROMPTS cDefMsg OF oWndHija
@ 0,0 listbox oBEmp .....
oBEmp:bSeek := {|lRet| oBEmp:DbfSeek(.T.) }
oBEmp:bUpdateBuffer:= {|| UpBuffer( oWndHija:oStatusBar, ;
cDefMsg, oBEmp:cBuffer ) }
STATIC FUNCTION UpBuffer( oStatusBar, cDefMsg, cBuffer )
local cMsg
if Len( cBuffer ) > 0
cMsg:= "Buscando: " + upper(cBuffer)
else
cMsg:= cDefMsg
endif
oStatusBar:SetMsg( PadR( cMsg ,200) )
return Nil
y el programa falla este es el error:
error base/1004 message not found: TMDICHILD:OSTATUSBAR from errorsys, line: 0
Gracias
Pako |
set message vs statusbar | ya resuleto !!
Gracias.
Salu2.
Pako |
set message vs statusbar | Paco,
bien! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
set region | have you an sample to see only a region of a dialog ? |
set region | Hello Sylvio,
what do you mean with region ?
Just to show some controls ?
When it is, what you mean, just do like : oSay1:Hide(), oGet1:Hide,
oBtn1:Hide() ...
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
set region | no, layer dialog....but perhaps i found the solution |
set scope | Please send english samples of set scope to my gmail.
This my scope : set filter to &(cfilter)
[code:343773uf]
a_fields[1]:="4->me_mc_serl"
a_fields[2]:="4->me_mc_brn"
a_vars[1]:=V_me_SERIAL
a_vars[2]:=V_mc_brn
cValue := ""
cFilter := ""
For i := 1 to 2
IF Empty(a_Vars[i]) && Don't process empty variables
LOOP
ENDIF
DO CASE && Create char value
CASE (VALTYPE(a_vars[i]) == "D" .and. a_vars[i]==V_me_START_D);
.or. (VALTYPE(a_vars[i]) == "D" .and. a_vars[i]==V_me_in_d)
cValue := 'DTOS(' + a_Fields[i] + ') == "' + DTOS(a_Vars[i]) + '"'
CASE VALTYPE(a_vars[i]) == "D" .AND. i==5
cValue := 'DTOS(' + a_Fields[i] + ') >= "' + DTOS(a_Vars[i]) + '"'
CASE VALTYPE(a_vars[i]) == "D" .AND. i==6
cValue := 'DTOS(' + a_Fields[i] + ') <= "' + DTOS(a_Vars[i]) + '"'
CASE VALTYPE(a_vars[i]) == "N"
cValue := 'STR(' + a_Fields[i] + ') == "' + STR(a_vars[i]) + '"' && or
* some other NUM->Chr conversion
CASE VALTYPE(a_vars[i]) == "C"
cValue :="alltrim(upper("+ a_Fields[i]+"))" + '=="' + alltrim(upper(a_Vars[i])) + '"'
ENDCASE
IF Empty(cFilter) && this is the first element
cFilter := cValue
ELSE
cFilter += " .AND. " + cValue
ENDIF
NEXT
set filter to &(cfilter)
[/code:343773uf] |
set scope | i think this is the correct one :-
set filter to &cfilter
or
set filter to (cfilter) |
set scope | Hola amigos, uso el set scope y cuando compilo (estoy pasando de fw a fwh25)no reconoce el comando, es un problema de la versión de xharbour es la simples 99.3? Ó hay que poner algún include específico de xharbour para que lo reconozca
Gracias |
set scope | USE EL COMANDO:
ORDSCOPE() |
set scope | Gracias Karina, después que envié el mail probé como vos indicas y funcionó bien, había presupuesto que si no andaba set scope tampoco lo haría ordscope().
Luis |
set spinner on combobox | [img:2uhbmj7x]https://i.postimg.cc/8z7Vdy8c/combo.png[/img:2uhbmj7x]
when the user change the second combobox , the procedure must change the value of the tget
[code=fw:2uhbmj7x]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> @ <span style="color: #000000;">480</span>,<span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx3 <span style="color: #0000ff;">Var</span> cFormazione <span style="color: #0000ff;">ITEMS</span> aFormazione ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span><br /> @ <span style="color: #000000;">510</span>,<span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx4 <span style="color: #0000ff;">Var</span> cCalcolo <span style="color: #0000ff;">ITEMS</span> aCalcolo ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> <span style="color: #000000;">[</span>b<span style="color: #000000;">]</span>ResetValore<span style="color: #000000;">[</span>/b<span style="color: #000000;">]</span><span style="color: #000000;">(</span>oCbx3:<span style="color: #000000;">nAt</span>,oCbx4:<span style="color: #000000;">nAt</span>, @nValore,aGet<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">540</span>,<span style="color: #000000;">630</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">var</span> nValore <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span><br /><br /><br /><br /><span style="color: #00C800;">Function</span> ResetValore<span style="color: #000000;">(</span>nForma,nMetodo, nValore,oControls<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> nForma= <span style="color: #000000;">1</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">3</span><br /> * oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bMin</span> := <span style="color: #000000;">3</span><br /><br /> elseif nForma= <span style="color: #000000;">2</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">6</span><br /> * oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bMin</span> := <span style="color: #000000;">6</span><br /> <span style="color: #00C800;">Endif</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2uhbmj7x]
How I can to set MIN and MAX ? ( I must change only the value of MIN
I tried with [b:2uhbmj7x]oControls[8]:bMin := 3[/b:2uhbmj7x] and make error |
set spinner on combobox | Mire en \samples\XBRCALEN.PRG si le ayuda. No entiendo muy bien lo que quieres hacer. Un ejemplo completo siempre es bienvenido para las críticas.
Look in \samples\XBRCALEN.PRG if it helps. I don't quite understand what you want to do. A complete example is always welcome for criticism.
Regards, saludos. |
set spinner on combobox | [quote="karinha":1dbk42y3]Mire en \samples\XBRCALEN.PRG si le ayuda. No entiendo muy bien lo que quieres hacer. Un ejemplo completo siempre es bienvenido para las críticas.
Look in \samples\XBRCALEN.PRG if it helps. I don't quite understand what you want to do. A complete example is always welcome for criticism.
Regards, saludos.[/quote:1dbk42y3]
in fact I understood that you did not understand
Is simple
if the first combo is 1 and the second is 3 the value in the get must be 3 as the min value and 90 as the max
if the first combo is 2 and the second is 3 the value in the get must be 6 as the min value and 90 as the max
here is a little test, obviously it changes the value of the get but if the user presses the spinner he could put the value 1 instead of three or six
I wanted to block the minimum value
[code=fw:1dbk42y3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold, oFontGet<br /><span style="color: #00C800;">local</span> nBottom := <span style="color: #000000;">44</span><br /><span style="color: #00C800;">local</span> nRight := <span style="color: #000000;">98</span><br /><span style="color: #00C800;">local</span> nWidth := <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> nHeight := nBottom * DLG_CHARPIX_H<br /><br /><span style="color: #00C800;">local</span> aGet:=array<span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oSay:=array<span style="color: #000000;">(</span><span style="color: #000000;">20</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> aFormazione:=<span style="color: #000000;">{</span><span style="color: #ff0000;">"apples"</span>,<span style="color: #ff0000;">"bananas"</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">local</span> cFormazione:= <span style="color: #ff0000;">"apples"</span><br /><span style="color: #00C800;">local</span> aCalcolo:=<span style="color: #000000;">{</span><span style="color: #ff0000;">"method 1"</span>,<span style="color: #ff0000;">"method 2"</span>,;<br /> <span style="color: #ff0000;">"method 3"</span>,<span style="color: #ff0000;">"method 4"</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">local</span> cCalcolo := <span style="color: #ff0000;">"method 1"</span><br /><span style="color: #00C800;">local</span> oCbx3<br /><span style="color: #00C800;">local</span> nValore:= <span style="color: #000000;">1</span><br /><span style="color: #00C800;">local</span> oCbx4<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWidth, nHeight ;<br /> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ; <span style="color: #B900B9;">//RESIZABLE FONT oFont</span><br /> <span style="color: #0000ff;">TiTle</span> <span style="color: #ff0000;">" Test"</span><br /><br /><br /><br /> @ <span style="color: #000000;">480</span>,<span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">9</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fruit :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">510</span>,<span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">10</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Method :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">540</span>,<span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">11</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Value :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><br /> @ <span style="color: #000000;">480</span>,<span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx3 <span style="color: #0000ff;">Var</span> cFormazione <span style="color: #0000ff;">ITEMS</span> aFormazione ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> ResetValore<span style="color: #000000;">(</span>oCbx3:<span style="color: #000000;">nAt</span>,oCbx4:<span style="color: #000000;">nAt</span>, @nValore,aGet<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">510</span>,<span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx4 <span style="color: #0000ff;">Var</span> cCalcolo <span style="color: #0000ff;">ITEMS</span> aCalcolo ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> ResetValore<span style="color: #000000;">(</span>oCbx3:<span style="color: #000000;">nAt</span>,oCbx4:<span style="color: #000000;">nAt</span>, @nValore,aGet<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">540</span>,<span style="color: #000000;">630</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">var</span> nValore <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> ResetValore<span style="color: #000000;">(</span>nForma,nMetodo, nValore,oControls<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">case</span><br /> <span style="color: #00C800;">case</span> nForma= <span style="color: #000000;">1</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">3</span><br /> <span style="color: #00C800;">case</span> nForma= <span style="color: #000000;">2</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">6</span><br /> <span style="color: #00C800;">otherwise</span><br /> nValore:= <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">endcase</span><br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span>nValore<span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1dbk42y3] |
set spinner on combobox | Caro Silvio, mira se yuda:
[code=fw:88j1iwms]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SETSPINN.PRG - By Silvio Falconi.</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oBrw, oFont, oBold, oFontGet<br /> <span style="color: #00C800;">LOCAL</span> nBottom := <span style="color: #000000;">44</span><br /> <span style="color: #00C800;">LOCAL</span> nRight := <span style="color: #000000;">98</span><br /> <span style="color: #00C800;">LOCAL</span> nWidth := <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> nHeight := nBottom * DLG_CHARPIX_H<br /> <span style="color: #00C800;">LOCAL</span> aGet := ARRAY<span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oSay := ARRAY<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> aFormazione := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"apples"</span>, <span style="color: #ff0000;">"bananas"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> cFormazione := <span style="color: #ff0000;">"apples"</span><br /> <span style="color: #00C800;">LOCAL</span> aCalcolo := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"method 1"</span>, <span style="color: #ff0000;">"method 2"</span>, <span style="color: #ff0000;">"method 3"</span>, <span style="color: #ff0000;">"method 4"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> cCalcolo := <span style="color: #ff0000;">"method 1"</span><br /> <span style="color: #00C800;">LOCAL</span> oCbx3<br /> <span style="color: #00C800;">LOCAL</span> nValore := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">LOCAL</span> oCbx4<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWidth, nHeight <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TiTle</span> <span style="color: #ff0000;">" Test"</span><br /><br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br /> @ <span style="color: #000000;">480</span>, <span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">9</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fruit :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">510</span>, <span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">10</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Method :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">540</span>, <span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">11</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Value :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">480</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx3 <span style="color: #0000ff;">Var</span> cFormazione <span style="color: #0000ff;">ITEMS</span> aFormazione ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> ResetValore<span style="color: #000000;">(</span> oCbx3:<span style="color: #000000;">nAt</span>, oCbx4:<span style="color: #000000;">nAt</span>, @nValore,aGet <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">510</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx4 <span style="color: #0000ff;">Var</span> cCalcolo <span style="color: #0000ff;">ITEMS</span> aCalcolo ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span><span style="color: #000000;">(</span> ResetValore<span style="color: #000000;">(</span> oCbx3:<span style="color: #000000;">nAt</span>, oCbx4:<span style="color: #000000;">nAt</span>, @nValore, aGet <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">540</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> nValore <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">(</span> nValore >= <span style="color: #000000;">1</span> .AND. nValore <= <span style="color: #000000;">90</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> ResetValore<span style="color: #000000;">(</span> nForma, nMetodo, nValore, oControls <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> nForma = <span style="color: #000000;">1</span> .AND. nMetodo = <span style="color: #000000;">3</span><br /><br /> nValore := <span style="color: #000000;">3</span><br /><br /> <span style="color: #00C800;">CASE</span> nForma = <span style="color: #000000;">2</span> .AND. nMetodo = <span style="color: #000000;">3</span><br /><br /> nValore := <span style="color: #000000;">6</span><br /><br /> <span style="color: #00C800;">OTHERWISE</span><br /><br /> nValore := <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">ENDCASE</span><br /><br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> nValore >= <span style="color: #000000;">1</span> .AND. nValore <= <span style="color: #000000;">90</span> <span style="color: #000000;">)</span><br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">(</span> nValore <span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ELSE</span> <span style="color: #B900B9;">// aGet[8]</span><br /><br /> nValore := <span style="color: #000000;">0</span><br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">(</span> nValore <span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br /> </div>[/code:88j1iwms]
Regards, saludos. |
set spinner on combobox | hi Silvio,
i would try aGet[8]:bMin
[code=fw:1id4twi1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> Spinner<span style="color: #000000;">(</span> bUp, bDown, bMin, bMax <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TGet<br /><br /> <span style="color: #00C800;">If</span> ::<span style="color: #000000;">lReadOnly</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">Endif</span><br /><br /> ::<span style="color: #000000;">bMin</span> := bMin<br /> ::<span style="color: #000000;">bMax</span> := bMax</div>[/code:1id4twi1] |
set spinner on combobox | [quote="karinha":295t90kx]Caro Silvio, mira se yuda:
[code=fw:295t90kx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SETSPINN.PRG - By Silvio Falconi.</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oBrw, oFont, oBold, oFontGet<br /> <span style="color: #00C800;">LOCAL</span> nBottom := <span style="color: #000000;">44</span><br /> <span style="color: #00C800;">LOCAL</span> nRight := <span style="color: #000000;">98</span><br /> <span style="color: #00C800;">LOCAL</span> nWidth := <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> nHeight := nBottom * DLG_CHARPIX_H<br /> <span style="color: #00C800;">LOCAL</span> aGet := ARRAY<span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oSay := ARRAY<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> aFormazione := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"apples"</span>, <span style="color: #ff0000;">"bananas"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> cFormazione := <span style="color: #ff0000;">"apples"</span><br /> <span style="color: #00C800;">LOCAL</span> aCalcolo := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"method 1"</span>, <span style="color: #ff0000;">"method 2"</span>, <span style="color: #ff0000;">"method 3"</span>, <span style="color: #ff0000;">"method 4"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> cCalcolo := <span style="color: #ff0000;">"method 1"</span><br /> <span style="color: #00C800;">LOCAL</span> oCbx3<br /> <span style="color: #00C800;">LOCAL</span> nValore := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">LOCAL</span> oCbx4<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWidth, nHeight <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TiTle</span> <span style="color: #ff0000;">" Test"</span><br /><br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br /> @ <span style="color: #000000;">480</span>, <span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">9</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fruit :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">510</span>, <span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">10</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Method :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">540</span>, <span style="color: #000000;">510</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">11</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Value :"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">480</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx3 <span style="color: #0000ff;">Var</span> cFormazione <span style="color: #0000ff;">ITEMS</span> aFormazione ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> ResetValore<span style="color: #000000;">(</span> oCbx3:<span style="color: #000000;">nAt</span>, oCbx4:<span style="color: #000000;">nAt</span>, @nValore,aGet <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">510</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx4 <span style="color: #0000ff;">Var</span> cCalcolo <span style="color: #0000ff;">ITEMS</span> aCalcolo ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg HEIGHTGET <span style="color: #000000;">18</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span><span style="color: #000000;">(</span> ResetValore<span style="color: #000000;">(</span> oCbx3:<span style="color: #000000;">nAt</span>, oCbx4:<span style="color: #000000;">nAt</span>, @nValore, aGet <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">540</span>, <span style="color: #000000;">630</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> nValore <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">(</span> nValore >= <span style="color: #000000;">1</span> .AND. nValore <= <span style="color: #000000;">90</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> ResetValore<span style="color: #000000;">(</span> nForma, nMetodo, nValore, oControls <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> nForma = <span style="color: #000000;">1</span> .AND. nMetodo = <span style="color: #000000;">3</span><br /><br /> nValore := <span style="color: #000000;">3</span><br /><br /> <span style="color: #00C800;">CASE</span> nForma = <span style="color: #000000;">2</span> .AND. nMetodo = <span style="color: #000000;">3</span><br /><br /> nValore := <span style="color: #000000;">6</span><br /><br /> <span style="color: #00C800;">OTHERWISE</span><br /><br /> nValore := <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">ENDCASE</span><br /><br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> nValore >= <span style="color: #000000;">1</span> .AND. nValore <= <span style="color: #000000;">90</span> <span style="color: #000000;">)</span><br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">(</span> nValore <span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ELSE</span> <span style="color: #B900B9;">// aGet[8]</span><br /><br /> nValore := <span style="color: #000000;">0</span><br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">(</span> nValore <span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br /> </div>[/code:295t90kx]
Regards, saludos.[/quote:295t90kx]
No not run
if the user changes the value back to 1 when the minimum is 3 or 6 the procedure could crash because I'll explain for example if we analyze the sequences
1-2 adds up to 3 this when it comes to sequences with two numbers
1-2-3 the minimum sum is 6 this when it concerns the sequences with three numbers
if the user changes and puts 1 the procedure will never be able to create an array in which the summed sequences make 1 and therefore could crash the program making an error
I think I have explained the problem well |
set spinner on combobox | Silvio:
[code=fw:gajrh4tp]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> ResetValore<span style="color: #000000;">(</span>nForma,nMetodo, nValore,oControls<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">case</span><br /> <span style="color: #00C800;">case</span> nForma= <span style="color: #000000;">1</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">3</span><br /> <span style="color: #00C800;">case</span> nForma= <span style="color: #000000;">2</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">6</span><br /> <span style="color: #00C800;">otherwise</span><br /> nValore:= <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">endcase</span><br /><br /> <span style="color: #B900B9;">// ***** This do the trick ***** //</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bMin</span> := <span style="color: #000000;">{</span>|| nValore <span style="color: #000000;">}</span> <br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span>nValore<span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:gajrh4tp] |
set spinner on combobox | [quote="Cgallegoa":2oc9ip5u]Silvio:
[code=fw:2oc9ip5u]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> ResetValore<span style="color: #000000;">(</span>nForma,nMetodo, nValore,oControls<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">case</span><br /> <span style="color: #00C800;">case</span> nForma= <span style="color: #000000;">1</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">3</span><br /> <span style="color: #00C800;">case</span> nForma= <span style="color: #000000;">2</span> .and. nMetodo= <span style="color: #000000;">3</span><br /> nValore:= <span style="color: #000000;">6</span><br /> <span style="color: #00C800;">otherwise</span><br /> nValore:= <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">endcase</span><br /><br /> <span style="color: #B900B9;">// ***** This do the trick ***** //</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bMin</span> := <span style="color: #000000;">{</span>|| nValore <span style="color: #000000;">}</span> <br /><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span>nValore<span style="color: #000000;">)</span><br /> oControls<span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2oc9ip5u][/quote:2oc9ip5u]
Thanks I had already tried ... but there is a problem !! If the procedure tells the tget that bMin: = {|| nValue}, changes the value ok. if the user increases and then decreases it does not return to the minimum number
perhaps with a video I try to understand the problem
[img:2oc9ip5u]https://i.postimg.cc/ZKGjXzV8/spinner.gif[/img:2oc9ip5u]
ie if the user presses [b:2oc9ip5u]the down arrow he cannot decrease the value[/b:2oc9ip5u]
the user can initially decrease or increase the value in the get by pressing the spinner buttons,
once the ResetValore() function has set the minimum value the user can only increase the value, and cannot return back |
set2010SkinMenu | Where I can found set2010SkinMenu function ?
I need the same color to set Toolbar on my application |
set2010SkinMenu | Silvio,
I already answered you to your email, not sure if anyhow you need that code.
BTW, HAPPY BIRTHDAY to Silvio!!! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
set2010SkinMenu | Happy Birthday!
EMG |
set2010SkinMenu | Happy Birthday Mr Silvio <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
set2010SkinMenu | [quote="nageswaragunupudi":htm85bef]Happy Birthday Mr Silvio <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:htm85bef]
+1 |
set2010SkinMenu | thanks to all.... |
set2010SkinMenu | Silvio: Happy Birthday
Saludos
Ruben Dario Fernandez |
setCopies(n) | Hola,
Funciona setCopies?
estoy usandolo y no me genera 2 copias de la pagina
fwh 10.11
saludos,
Mauricio |
setCopies(n) | [code=fw:3uuotjd4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">PRINTER</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"BLA BLA BLA"</span><br /><br /> oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">//oPrn:setsize(2159,1397) // Para selecionar meia folha</span><br /><br /> oPrn:<span style="color: #000000;">SetCopies</span><span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Quantidade de copias a imprimir</span><br /><br /> </div>[/code:3uuotjd4] |
setCopies(n) | he leido aca en el foro que esto no funciona en cualquier impresora. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
salu2 |
setCopies(n) | [quote="carlos vargas":2nbjqzti]he leido aca en el foro que esto no funciona en cualquier impresora. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
salu2[/quote:2nbjqzti]
Porque mi querido amigo?
Saludos. |
setCopies(n) | en PRIMOPDF no funciona,
no me genera la copia
saludos,
Mauricio |
setCopies(n) | [quote="Mauricio":3hop1xqk]en PRIMOPDF no funciona,
no me genera la copia
saludos,
Mauricio[/quote:3hop1xqk]
Mauricio intentas com PDF FACTORY porfa.
Saludos. |
setDialogEsc( lOnlOff ) FWH8.08 | setDialogEsc( lOnlOff ) no me funciona esta funcion, siempre se cierran los dialogos al presionar ESC, tengo FWH 8.08la seteo en ON o OFF (.t. o .f.) y la coloco al principio de mi aplicacion, nunca hace nada, la he colocado en varias partes del sistema y nada, lo que me quedo fue colocarla en el bolsillo y olvidarme de ella (por ahora)he tenido que optar por colocar los valid en cada dialog VALID !GETKEYSTATE( VK_ESCAPE ) |
setDialogEsc( lOnlOff ) FWH8.08 | Puedes hacer asi, STATIC lSalida := .F.[code:bxe146oc]
REDEFINE BUTTON oBtn OF oDlg ;
ACTION( lSalida := .T., oDlg:End() )
ACTIVATE DIALOG odlg CENTERED ;
VALID( lSalida )
[/code:bxe146oc] |
setDialogEsc( lOnlOff ) FWH8.08 | gracias karinha, es muy buena idea tambien, pero lo ideal seria que aprovechando la utilidad de dicha funcion no tengas que hacer el VALID en todos los dialogos... |
setLastkey(0) ? ( Solved! ) | Dear Antonio, James, Uwe and friends!!
How, after pressed ESC, I can set the last key pressed to another, or simply, cancel your execution? |
setLastkey(0) ? ( Solved! ) | Somebody knows?
Exists any way to do? |
setLastkey(0) ? ( Solved! ) | Julio,
>How, after pressed ESC, I can set the last key pressed to another, or simply, cancel your execution?
I am not sure what you are asking. Can you explain in more detail, maybe with an example?
James |
setLastkey(0) ? ( Solved! ) | James,
Thanks for you answer!
In determinate screen of my system, when the user press the key and if this key is escape, I want to cancel this pressed key... like setLastKey(0) of clipper. This is into a get! |
setLastkey(0) ? ( Solved! ) | Julio from Brazil,
Maybe you could have a look at [url:js2tlbck]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=14241[/url:js2tlbck].
This discussion was started by me about a button-problem but it seemed to be a Lastkey()-problem.
Maybe you can find the necessary information there.
Good luck.
Michel from Belgium on the other side of the world. |
setLastkey(0) ? ( Solved! ) | Julio and Michel,
>In determinate screen of my system, when the user press the key and if this key is escape, I want to cancel this pressed key... like setLastKey(0) of clipper. This is into a get!
This is not standard windows behavior. When the user is typing into a GET and they press the escape key, the dialog should close without saving the data. This is standard windows behavior.
If you wish to do something non-standard, then you should have a REALLY good reason for it as ALL users will be confused by it.
I was the one that asked for lastKey() to be added to FW many years ago. It was needed to process oGet:bChange since the last key typed wasn't in the GET buffer when bChange was eval'd. This has turned out to be a continuous issue since then due to the confusion about it.
Lastkey() was only designed to be used with GETs and only for that purpose. It does not contain the last key typed anywhere in the application. It was (originally) code added only to the TGet class. I don't know if it has been added to other classes since then. You can see the problem, all the FW source code would have to be read and evaluated for the addition of lastkey processing. Personally, I do not think this would be worth the effort. I have never found the need for the use of lastkey() except with the GET and even that is not needed now since we now have oGet:bPostEdit which does contain that lastkey typed.
From your description of the behavior you want, it sounds like you just need to use the backspace key. That "cancels" the last key typed.
Regards,
James |
setLastkey(0) ? ( Solved! ) | James,
You remember my topic about the incremental search when click any header of a xbrowse?
So, I need this solution because when the user is typing into a get and press the escape key, it closes the dialog and I want only that closes the object get! |
setLastkey(0) ? ( Solved! ) | James,
LastKey() was a function, already existing in Clipper, wasn't it ?
Julio,
Here is an example of the way I use to handle the Escape-key in my dialog box :
[code:1heqkch7]LOCAL cGET1 := SPACE(10)
LOCAL cGET2 := SPACE(10)
LOCAL oDlg
LOCAL cNiv := 0
DEFINE DIALOG oDlg NAME "DLGBOX" OF oWnd
REDEFINE GET cGET1 ID 101 OF oDlg PICTURE "XXXXXXXXXX"
REDEFINE GET cGET2 ID 102 OF oDlg PICTURE "XXXXXXXXXX"
REDEFINE BUTTON ID 901 OF oDlg ACTION (cNiv:=9,oDlg:End()) // = OK-button
REDEFINE BUTTON ID 902 OF oDlg ACTION (cNiv:=0,oDlg:End()) // = Cancel-button
ACTIVATE DIALOG oDlg CENTERED
IF LastKey() = VK_ESCAPE ; cNiv := 0 ; ENDIF
IF cNiv = 9 .OR. (cNiv = 0 .AND. MsgYesNo("The data have been changed. Do you want the data to be save anyway ?")
// Here the data are saved.
ENDIF[/code:1heqkch7]
If the data have been changed and the Cancel-button has been clicked or the Escape-key has been pushed, the user is alarmed that the data have been changed to prevent that data are lost.
Only, there seems to be a problem with the LastKey() function in comparison with the one I was used to in Clipper. (see my topic [url:1heqkch7]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=14241[/url:1heqkch7])
Good luck. |
setLastkey(0) ? ( Solved! ) | Julio,
Maybe you could put into the [b:30h9366q]valid[/b:30h9366q] of the Get (or dialog box, or window),
[code:30h9366q]
if GetKeyState(VK_ESCAPE)
<Esc was pressed, do something>
else
<Esc wasn't pressed, do something else>).
endif
[/code:30h9366q]
Can't comment on lastkey() as has never used it though. |
setLastkey(0) ? ( Solved! ) | Hua,
I have a long experience that GetKeyState() isn't always working like I want to.
That's why I use a combination of GetKeyState() and LastKey() as you can see in the other topic [url:3g5qded6]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=14241[/url:3g5qded6] which also handles about this problem. |
setLastkey(0) ? ( Solved! ) | My situation is:
I have an object "get" that opens up on a xbrowse, into a dialog that was open on top of another (as modal)
Where, when focused on "get", I press the ESC key he should only one run "oGet:end()", but closes the dialog where is the xbrowse too!
I would just finish the object "get", without closing the dialog! It is possible? |
setLastkey(0) ? ( Solved! ) | __keyboard() |
setLastkey(0) ? ( Solved! ) | Julio,
As someone else mentioned, use the VALID clause of the dialog.
activate dialog oDlg valid (oGet:end(), .f.)
But it is not quite so simple because you also need to be able to close the dialog and when you always return .f. from the valid clause then you can't close the dialog.
So you will need to do something like:
activate dialog oDlg valid (valtype(oGet)!=nil, (oGet:end(), .f.), .t.)
Regards,
James |
setLastkey(0) ? ( Solved! ) | James,
I see it! But this is not work!
I saw the solution mentioned but it does not serve.
When I am typing anything into "get", I can access anything in the dialog because it is empowered normally.
So if I press the escape key, only closes the get and not the dialog together |
setLastkey(0) ? ( Solved! ) | Michel,
>LastKey() was a function, already existing in Clipper, wasn't it ?
Yes, you are right and I confused this with the var oGet:nLastKey, so my previous comments all were refering to oGet:nLastKey. Sorry.
The Lastkey() function is probably a (x)Harbour function. The problem may be that Windows does not send all keys to the windows event queue so there is no way to get them into the lastkey() function.
I would say this about the message you are using after the user closes the dialog (in your eample). As a user I would find this very annoying. I suggest that you think in terms of probability not possibility. Yes, there is a [b:26txef7i]possibility[/b:26txef7i] that a user changed the data and pressed the cancel button (or escape key) and really meant to press the OK button, but what is the [b:26txef7i]probability[/b:26txef7i] that this happened? I would guess a thousand to one. So, the user is going to have to deal with this message 999 times when they really meant to do what they did. And it MIGHT only save them once in that thousand times. But, since the user will be answering this question so many times, they are not even going to be reading it and thinking about it, they are just going to answer "No" every time, even the one time when they really meant "Yes."
So, I would never use confirmation messages. They don't work and they create lots of extra work for the user.
If you eliminate your confirmation message, then you eliminate your problem with laskKey().
Regards,
James |
setLastkey(0) ? ( Solved! ) | Julio,
>So if I press the escape key, only closes the get and not the dialog together
I am not sure what you are saying again. I thought that you wanted to close the GET without closing the dialog? Are you now saying that you want to close them both at the same time?
Did you try my example VALID?
James |
setLastkey(0) ? ( Solved! ) | James,
> How I execute the KEYBOARD command of clipper? |
setLastkey(0) ? ( Solved! ) | [quote="James Bott":26h35wtz]__keyboard()[/quote:26h35wtz]
Thank you James! That's it! |
setalpha() ?? | I'am testing the testimg.prg and found a SetAlpha() function, but i dont know how to use it.
any help about this function ?
tks |
setalpha() ?? | Romeo ,
a [color=#0000FF:2lfwdz54]Alphablended[/color:2lfwdz54] Image is needed, in case You want to show a [color=#0000FF:2lfwdz54]SHADOW[/color:2lfwdz54]
To show a simple background transparent, You can use a normal color
SetAlpha( .F. ) shows the transparent-area of a ALPHAblended image as a BLACK color
I don't know any reason to use it.
But You can use something like :
if [color=#0000FF:2lfwdz54]IsAlpha[/color:2lfwdz54]( aTemp[ n ][ 1 ] )
to detect, if a image includes a alpha-channel
[img:2lfwdz54]http://www.pflegeplus.com/IMAGES/Alpha2.jpg[/img:2lfwdz54]
Very useful to download PIXELFORMER
Some links
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=23687&p=127412#p127412">viewtopic.php?f=3&t=23687&p=127412#p127412</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=17288&p=89855&hilit=pixelformer#p89855">viewtopic.php?f=3&t=17288&p=89855&hilit=pixelformer#p89855</a><!-- l -->
A alphablended image ( BMP or PNG ) is used to show a shadow and a transparent level of a color ( yellow ).
[img:2lfwdz54]http://www.pflegeplus.com/IMAGES/Pf1.jpg[/img:2lfwdz54]
A non alphablended image uses the background-color to be transparent.
[img:2lfwdz54]http://www.pflegeplus.com/IMAGES/Pf2.jpg[/img:2lfwdz54]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
setalpha() ?? | many many tks
R |
setalpha() ?? | Uwe,
many thanks |
setballon(.t.) | Hi,Does anyone use this feature from 2007 in production?.Best regards, |
setballon(.t.) | Yes. I use. Balloon tips looks better. We can give a toggle to the user to choios the kind of tips, with or without balloon.I also use built-in facilitty to specify header, icon and color for tooltips. |
setcheck en xbrowse | Hola compañeros la consulta es como hago para que setcheck() funcione correctamente en un caso como el siguiente, dónde el campo vista es lógico
[code=fw:2ew7bakg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg OBJECT oAfip;<br /> COLUMNS <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">9</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">}</span>;<br /> HEADERS <span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">"Proveedor"</span>, <span style="color: #ff0000;">"Pedido"</span>,<span style="color: #ff0000;">"Referencia"</span>, <span style="color: #ff0000;">"Fecha djai"</span>, <span style="color: #ff0000;">"Djai"</span>, <span style="color: #ff0000;">"Alta Djai"</span>,<span style="color: #ff0000;">"Fecha Despacho"</span>, <span style="color: #ff0000;">"Despacho"</span>, <span style="color: #ff0000;">"Importe"</span>;<br /> COLSIZES <span style="color: #000000;">20</span>,<span style="color: #000000;">130</span>,<span style="color: #000000;">90</span>, <span style="color: #000000;">65</span>, <span style="color: #000000;">75</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">75</span>,<span style="color: #000000;">75</span>, <span style="color: #000000;">90</span>,<span style="color: #000000;">90</span>;<br /> LINES CELL AUTOSORT FASTEDIT <span style="color: #0000ff;">UPDATE</span><br /><br /><br /><br /> <span style="color: #B900B9;">// oBrw:vista:SetCheck()</span><br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">lDisplayZeros</span> := .F.<br /> :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROWRC<br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_WIDEST<br /> :<span style="color: #000000;">bClrSel</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span>,aGradBarSel <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bClrSelFocus</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> CLR_BLACK, aSelGrad <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">lColDividerComplete</span> := .F.<br /> :<span style="color: #000000;">lAllowColHiding</span> := .F.<br /> <br /> END WITH<br /><br /><br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span>|| oAfip:<span style="color: #000000;">vista</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">vista</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> END WITH<br /><br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span>|| oAfip:<span style="color: #000000;">proveedor</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_GET<br /> <span style="color: #B900B9;">// :nDataStrAlign := AL_RIGHT</span><br /> END WITH<br /><br /> </div>[/code:2ew7bakg]
me muestra el checbox pero no hace nada cuando clikeo sobre él
Gracias |
setcheck en xbrowse | SurGom, a mi me funciona como lo haces pero dandole doble click sobre la celda del SetCheck, esten o no las demas celdas editables, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
setcheck en xbrowse | Prueba con:
[code=fw:2ed8qauh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span>|| oAfip:<span style="color: #000000;">vista</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nEditType</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:2ed8qauh] |
setcheck en xbrowse 1 | Y en este caso como hago para que en el setcheck pueda usarlo cuando toda la fila no sea editable
[code=fw:1moc6pyo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> xbrNumFormat<span style="color: #000000;">(</span> <span style="color: #ff0000;">"E"</span>, .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> GetSysMetrics<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span> * <span style="color: #000000;">0.9</span>,<span style="color: #000000;">600</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"REVISION DE DATOS DJAI "</span><br /><br /> @ <span style="color: #000000;">30</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg DATASOURCE uData ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT FOOTERS CELL LINES NOBORDER<br /><br /><br /><br /><br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">{</span> |oRec| CustEditDlg<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br /> :<span style="color: #000000;">vista</span>:<span style="color: #000000;">setcheck</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /><br /><br /> oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> CLR_BLACK,<span style="color: #000000;">(</span> IIF<span style="color: #000000;">(</span><span style="color: #000000;">(</span>uData<span style="color: #000000;">)</span>->vista,RGB<span style="color: #000000;">(</span><span style="color: #000000;">230</span>,<span style="color: #000000;">230</span>,<span style="color: #000000;">230</span><span style="color: #000000;">)</span>,RGB<span style="color: #000000;">(</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Editar"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #00C800;">Edit</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">60</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"AGregar"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #00C800;">Edit</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">110</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"TXT"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> generotxt<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /> </div>[/code:1moc6pyo]
Gracias nuevamente |
setcolor on a get with a conditional checkbox | To All
I have two simple fields I want to setcolor to ??? ( grey out ) when the top checkbox is .t.
[url=http://imageshack.us/photo/my-images/857/disable.jpg/:2810jv46][img:2810jv46]http://img857.imageshack.us/img857/6995/disable.jpg[/img:2810jv46][/url:2810jv46]
I have two onclick functions that blank out the fields and because of the when clause on the get .. they are disabled when the top checkbox is .t. .. but I can not seem to set the background color of the two disabled get fields to grey .. here is my code .. Checkfield1() seems to be the right place .. and I use oXXX:Setcolor("w/n") but the field does not grey out .. Color only seems to effect active get .. Is there a code block to set the color or to set the field to readonly and grey out the two fields ?
[code=fw:2810jv46]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oCBX_LINK <span style="color: #0000ff;">var</span> lCBX_LINK <span style="color: #0000ff;">ID</span> <span style="color: #000000;">114</span> <span style="color: #0000ff;">of</span> oEMPL ;<br /> <span style="color: #0000ff;">when</span> lCBX_HTML <> .t. ;<br /> <span style="color: #0000ff;">On</span> <span style="color: #0000ff;">Click</span> _ChkField1<span style="color: #000000;">(</span>lCBX_LINK<span style="color: #000000;">)</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> oCBX_HTML <span style="color: #0000ff;">var</span> lCBX_HTML <span style="color: #0000ff;">ID</span> <span style="color: #000000;">119</span> <span style="color: #0000ff;">of</span> oEMPL ;<br /> <span style="color: #0000ff;">when</span> lCBX_LINK <> .t. ;<br /> <span style="color: #0000ff;">On</span> <span style="color: #0000ff;">Click</span> _ChkField2<span style="color: #000000;">(</span>lCBX_HTML<span style="color: #000000;">)</span> <span style="color: #0000ff;">UPDATE</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oHBD <span style="color: #0000ff;">VAR</span> cHBD <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">of</span> oEMPL ;<br /> <span style="color: #0000ff;">when</span> lCBX_HTML = .t. <span style="color: #0000ff;">UPDATE</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oHSD <span style="color: #0000ff;">VAR</span> cHSD <span style="color: #0000ff;">ID</span> <span style="color: #000000;">121</span> <span style="color: #0000ff;">of</span> oEMPL ;<br /> <span style="color: #0000ff;">when</span> lCBX_HTML = .t. <span style="color: #0000ff;">UPDATE</span><br /><br /><span style="color: #B900B9;">//--------------------------------</span><br /><span style="color: #00C800;">Static</span> Func _ChkField1<span style="color: #000000;">(</span> lClick <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"chkfield1"</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">(</span> LCLICK <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /><span style="color: #00C800;">CASE</span> lCLICK = .T.<br /> <span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"CLICK = T SETTING FIELDS TO GREY"</span><span style="color: #000000;">)</span><br /> * lCBX_HTML := .F.<br /> cHBD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> cHSD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> * oCBX_HTML:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"disable"</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #000000;">Setcolor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"r/r"</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"color"</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> * oHSD:<span style="color: #000000;">Setcolor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"W/N"</span><span style="color: #000000;">)</span><br /> oHSD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">CASE</span> lClick = .f.<br /> lCBX_LINK := .F.<br /> oCBX_LINK:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> * lCBX_HTML := .F.<br /> cHBD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> cHSD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> * oCBX_HTML:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHSD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">ENDCASE</span><br /><br />SysReFresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /><br /><span style="color: #B900B9;">//--------------------------------</span><br /><span style="color: #00C800;">Static</span> Func _ChkField2<span style="color: #000000;">(</span> lClick <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> lClick = .f.<br /> lCBX_HTML := .F.<br /> cHBD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> cHSD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> oCBX_HTML:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> * oHBD:<span style="color: #000000;">Setcolor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"n/w"</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> * oHSD:<span style="color: #000000;">Setcolor</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"n/w"</span><span style="color: #000000;">)</span><br /> oHSD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />SysReFresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /> </div>[/code:2810jv46] |
setcolor on a get with a conditional checkbox | [code=fw:1xmdkjoy]<div class="fw" id="{CB}" style="font-family: monospace;">oGet:<span style="color: #000000;">lDisColors</span> = .T.<br />oGet:<span style="color: #000000;">nClrTextDis</span> = ...<br />oGet:<span style="color: #000000;">nClrPaneDis</span> = ...</div>[/code:1xmdkjoy]
EMG |
setcolor on a get with a conditional checkbox | Enrico
Your suggestion worked to disabled the text, however I am zero'ing out the fields with spaces .. in this view you see the text is grayed out and the background is still white .. what I want to do is blank out the fields and set the background to a disabled gray ..
[url=http://imageshack.us/photo/my-images/402/rickar.jpg/:1peqmouf][img:1peqmouf]http://img402.imageshack.us/img402/1408/rickar.jpg[/img:1peqmouf][/url:1peqmouf]
[code=fw:1peqmouf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//--------------------------------</span><br /><span style="color: #00C800;">Static</span> Func _ChkField1<span style="color: #000000;">(</span> lClick <span style="color: #000000;">)</span><br /><br />*<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"chkfield1"</span><span style="color: #000000;">)</span><br />*<span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">(</span> LCLICK <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> lClick = .f.<br /> lCBX_LINK := .F.<br /> oCBX_LINK:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> * cHBD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> * cHSD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> * oCBX_HTML:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHSD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><br />SysReFresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /><br /><span style="color: #B900B9;">//--------------------------------</span><br /><span style="color: #00C800;">Static</span> Func _ChkField2<span style="color: #000000;">(</span> lClick <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">IF</span> lClick = .f.<br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"chkfield2 click f "</span><span style="color: #000000;">)</span><br /><br /> lCBX_HTML := .F.<br />* cHBD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br />* cHSD := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> oCBX_HTML:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// just want a gray background</span><br /> oHBD:<span style="color: #000000;">lDisColors</span> = .T.<br /> * oHBD:<span style="color: #000000;">nClrBack</span> = CLR_RED<br /> * oHBD:<span style="color: #000000;">nClrTextDis</span> = CLR_RED<br /> * oHBD:<span style="color: #000000;">nClrPaneDis</span> = CLR_GRAY<br /> oHBD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHBD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHSD:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />SysReFresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /> </div>[/code:1peqmouf] |
setcolor on a get with a conditional checkbox | Hello Rick
deactivate lDisColors and use nClrTextDis and nClrPaneDis
[code=fw:3m4gqdoa]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd<br /> <span style="color: #00C800;">local</span> oMenu<br /> <br /> <span style="color: #0000ff;">menu</span> oMenu<br /> <span style="color: #0000ff;">MenuItem</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">action</span> Test<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">endmenu</span> <br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> oWnd <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Button Get Transparent"</span> <span style="color: #0000ff;">menu</span> oMenu <span style="color: #0000ff;">pixel</span><br /> <br /> <br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> oWnd<br /> <br /><span style="color: #00C800;">return</span> oWnd <br /> <br /> <br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg<br /> <span style="color: #00C800;">local</span> oGet3, oGet4<br /> <span style="color: #00C800;">local</span> cVar3, cVar4<br /> <span style="color: #00C800;">local</span> lActive := .f.<br /> <br /> cVar1 := <span style="color: #000000;">0</span><br /> cVar2 := <span style="color: #000000;">0</span><br /> cVar3 := <span style="color: #000000;">0</span><br /> cVar4 := <span style="color: #000000;">0</span><br /> <br /> <br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"From Code"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span><br /> <br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">checkbox</span> oChk <span style="color: #0000ff;">var</span> lActive <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Avtivated"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">change</span> <span style="color: #000000;">(</span> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">70</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">get</span> oGet3 <span style="color: #0000ff;">var</span> cVar3 <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">when</span> lActive <span style="color: #0000ff;">update</span><br /> @ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">get</span> oGet4 <span style="color: #0000ff;">var</span> cVar4 <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">when</span> lActive <span style="color: #0000ff;">update</span><br /> <br /> <br /> oGet3:<span style="color: #000000;">lDisColors</span> := .f. <span style="color: #B900B9;">// Deactive disable color</span><br /> oGet3:<span style="color: #000000;">nClrTextDis</span> := CLR_WHITE <span style="color: #B900B9;">// Color text disable status</span><br /> oGet3:<span style="color: #000000;">nClrPaneDis</span> := CLR_GRAY <span style="color: #B900B9;">// Color Pane disable status</span><br /><br /> oGet4:<span style="color: #000000;">lDisColors</span> := .f. <span style="color: #B900B9;">// Deactive disable color</span><br /> oGet4:<span style="color: #000000;">nClrTextDis</span> := CLR_WHITE <span style="color: #B900B9;">// Color text disable status</span><br /> oGet4:<span style="color: #000000;">nClrPaneDis</span> := CLR_GRAY <span style="color: #B900B9;">// Color Pane disable status</span><br /> <br /> <br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">centered</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3m4gqdoa] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.