topic
stringlengths
1
63
text
stringlengths
1
577k
sharing forms with mod_harbour !!!
Design your forms and share them. Other users modify them (visual inheritance) and share them again... This way forms turns into social self-contained entitites, with full functionality that can be shared and reused: [url:37j632zo]https&#58;//harbour&#46;fourtech&#46;es/modharbour_samples/designer&#46;prg?20190825071550[/url:37j632zo] shared and modified: [url:37j632zo]https&#58;//harbour&#46;fourtech&#46;es/modharbour_samples/designer&#46;prg?20190825071943[/url:37j632zo] This is a new era for the xbase development on the web The mod_harbour revolution !!! <!-- s:-D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":-D" title="Very Happy" /><!-- s:-D -->
sharing forms with mod_harbour !!!
Really nice and useful. Many compliments Antonio.
shell execute second try
Setting RTF to Wordpad MFC-aplication from configuration shellexecute( oWnd:hwnd,"open",rtf-file,....) has no effect. Resetting RTF extension to microsoft word , and it works !!!! How can we change this behaviour for shellexecute ????? Frank
shell execute second try
Frank, Both of these work for me: SHELLEXECUTE(0,0,"C:\TEST\TEST.RTF",0,0,1 ) SHELLEXECUTE( oWnd:hwnd,"open","C:\TEST\TEST.RTF",0,0,1) Make sure you have RTF files accosiated with WordPad. Jeff
shell.explorer Activex and Keyboard
When I use the shell.explorer activeX to a window, then user cannot use keyboards into forms to change fields. You can see the problem to webexp.prg (into samples) if you try to navigate google.com. Into this page the key "Tab" "doesn't work". Is there any idea how may I try permit the use of keyboard?
shell.explorer Activex and Keyboard
I am encountering the same issue. When jumping to the activeX control (containing a web form login page), I cannot use the Tab key to move from field to field. All other keyboard navigation seems to work fine. Has anybody else experienced this and found a fix? Thanks
shell.explorer Activex and Keyboard
We are aware of this bug but haven`t found a solution yet... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
shell.explorer Activex and Keyboard
hello. Is there any news on this topic? Regards.
shell.explorer Activex and Keyboard
Not yet. We have tried all ideas that came to mind and searched the web, with no solution yet <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
shellexec or winexec
Hello, I would need an example of how to use shellexec or winexec to run a program in the program's directory. Best regards Otto
shellexec or winexec
Hello, as a workaround I tried with a bat-file. cd\ cd xwinhotel call xwinhotel.exe This is working. Best regards Otto
shellexec or winexec
Is that what you mean ? cPt:=CurDrive()+':\'+CurDir() SHELLEXECUTE( 0, 0, cPt+"\"+MyFile, 0, 0, 1)
shellexec or winexec
function MyRun( cComando, nStyle, lWait, lShowResult ) local oShell, nRetorno IF valtype( nStyle ) != "N" nStyle := 0 ENDIF IF ValType( lWait ) != "L" lWait := .T. ENDIF IF ValType( lShowResult ) != "L" lShowResult := .F. ENDIF oShell := CreateObject( "WScript.Shell" ) IF !GetEnv( "OS" ) == "Windows_NT" cComando += "start " + cComando ENDIF TRY nRetorno := oShell:Run( "%comspec% /c " + cComando, nStyle, lWait ) CATCH MsgStop("ERRO NO ENVIO DO COMANDO!", "MYRUN") END IF lShowResult .and. nRetorno > 0 .and. nRetorno <= 32 MsgInfo( "Erro Win_Run(): " + ltrim( Str( nRetorno ) ), "Win_Run - Error" ) ENDIF oShell := NIL Return nRetorno = 0
shellexec or winexec
To run a second program in the same directory [code=fw:2driqyfg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">LOCAL</span>   cPathProgr := cFilePath<span style="color: #000000;">&#40;</span> GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />        <br />        WinExec<span style="color: #000000;">&#40;</span> cPathProgr + <span style="color: #ff0000;">"PROGR2.EXE"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2driqyfg]
shellexec or winexec
Hello, thank you all for your help. I will test all the solutions on the weekend. Best regards Otto
shellexecute
To All I have two different programs that I cut and past a simple shellexecute statement into : Curl := "http://www.yahoo.com" msginfo( Curl ) SHELLEXECUTE(nil,"open", cURL,0,0,1) One program this works and the other different program it does not .. Driving me absolutely nuts .. I have created a 3 line test program with the above lines and it works .. However, the Shellexecure that will not respond nor will it fail in a try, catch, end try statement... just does not work. Granted, this code is buried at least 3 levels deep from and MDI main window.. 1) Main MDIchild browse listbox .. click on a line for details 2) detail form is a modal dialog 3) click on a button for relational records to a modal listbox 4) click on a line for detail 5) click on a detail button to launch shellexec .. where it fails Any ideas why this code will not work in all instances ?? Rick Lipkin
shellexecute
To All I don't know what happened .. I decided to re-build the application ( old app ) one module at a time and fixing some .rc's and some sloppy code .. and Shellexecute is working just fine .. Go Figure Thanks Rick Lipkin
shellexecute
Running shellexec("exe") from a program in directory #1. To Run an exe in another directory #2. After the exe is closed in directory #2 i need to change a variable in directory #1. How can I find out when the exe is closed in directory #2 from directory #1. Thansk always for the help
shellexecute
Harvey, I don't know the kind of EXE, is running in Directory 2 ( a FWH-application ? ) You can test if any Application is still running with : [color=#0000FF:2r7c9z32]DLL32 FUNCTION GetExiCodP; ( hProcess AS LONG, ; @lpExitCode AS LONG ) ; AS LONG PASCAL; FROM "GetExitCodeProcess" LIB "KERNEL32"[/color:2r7c9z32] DLL32 FUNCTION GetExiCodT; ( hThread AS LONG, ; @lpExitCode AS LONG ) ; AS LONG PASCAL; FROM "GetExitCodeThread" LIB "KERNEL32" maybe using a Timer to check the Return-value for more Informations about < GetExitCodeProcess > You can search in the Internet Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
shellexecute
Uwe Thanks for the help. Always appreciated.
shellexecute
Hi All. I just want to view a pdf file so I use the command: tuss:=shellexecute(0,"open","c:\concentrics\cloudconnect.pdf",,,1) and it works with windows 7 but with windows 10 nothing happens and it returns 31. Probably its a very complicated answer but I hope not!
shellexecute
Shellexecute(0,0,"c:\concentrics\cloudconnect.pdf",0,0,3)
shellexecute
Beautiful! Thank you so much
shellexecute
Can you also try [code=fw:2l5f5app]<div class="fw" id="{CB}" style="font-family: monospace;"><br />HTMLVIEW<span style="color: #000000;">&#40;</span> <cPdffileWithFullpath> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2l5f5app]
shellexecute return code
Hi everybody, I'd like to know the meaning of a 42 return code. W100 64 bits Thanks
shellexecute return code
[quote="ADutheil":1rl16f86]Hi everybody, I'd like to know the meaning of a 42 return code. W100 64 bits Thanks[/quote:1rl16f86] From MSDN: [quote:1rl16f86]If the function succeeds, it returns a value greater than 32.[/quote:1rl16f86] So 42 means "all ok". EMG
shellexecute return code
Thanks.
shift + F5
THAT I CAN CALL A FUNCTION WITH COMBINATION OF KEYS ( shift + F5 ) JOHN
shift + F5
This is a working sample: [code:2elba4da]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg LOCAL cVar &#58;= SPACE&#40; 30 &#41; SETKEY&#40; VK_F2, &#123; || If&#40; GetKeyState&#40; VK_CONTROL &#41;, MsgInfo&#40; "Hello!" &#41;, &#41; &#125; &#41; SETKEY&#40; VK_F3, &#123; || If&#40; GetKeyState&#40; VK_SHIFT &#41;, MsgInfo&#40; "Hello!" &#41;, &#41; &#125; &#41; DEFINE DIALOG oDlg @ 1, 1 GET cVar OF oDlg @ 3, 1 BUTTON "&Close" OF oDlg ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg; CENTER RETURN NIL[/code:2elba4da] EMG
shift + F5
Enrico I A LOT THANK
show a BITMAP ON EXPLORERBAR RESOLVED!!!
I want show a bitmap on EXPLORERBAR NOT ON A SINGLE PANEL [img:m9xif7pa]http&#58;//img228&#46;imageshack&#46;us/img228/1165/errbmp&#46;jpg[/img:m9xif7pa] LOCAL oBrush := TBrush():New("NULL",,,) @ 420, 15 BITMAP oApp:oLogoBmp FILENAME ".\bitmaps\fivetech.BMP" NOBORDER PIXEL OF oApp():oExBar oApp:oLogoBmp:nClrPane := oApp():oExBar:nClrPane //GetSysColor(3) oApp:oLogoBmp:lTransparent := .t. oApp:oLogoBmp:oBrush := oBrush it show the bitmap but not is transparent, why ?
show a BITMAP ON EXPLORERBAR RESOLVED!!!
RESOLVED!!! I made a new method on ExplorerBar Class Now run ok!! thanks to Daniel for the help
show a BITMAP ON EXPLORERBAR RESOLVED!!!
Very nice screenshot <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
show /hide a bitmap on a get
I have this tget control When the cSeek is empty it must not show any button when the user insert any digit it must show the button and the bitmap How resolve it? [code=fw:9on3q3kt]<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;">&#40;</span><span style="color: #000000;">&#41;</span>        <br /> <br />   <span style="color: #00C800;">local</span> oDlg,oGet       <br />   <span style="color: #00C800;">local</span> cSeek:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><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;">"Test"</span>        <br /> <br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />                     BITMAP <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\e</span>limina.bmp"</span>;<br />                      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>cSeek    := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>,;<br />                                      oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ;<br />                  <br />                       oGet:<span style="color: #000000;">lBtnTransparent</span> :=.t.<br />                       oGet:<span style="color: #000000;">bChange</span>  := <span style="color: #000000;">&#123;</span> ||ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />                      oGet:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> ||ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><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;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span>,oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> cseek <span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span><br />     * oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ELSE</span><br />      oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\e</span>limina.bmp"</span><br />      oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">return</span> .t.<br /> </div>[/code:9on3q3kt]
show /hide a bitmap on a get
Silvio: Mira si te sirve asi: [code=fw:2h3acvlb]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br />&nbsp;<br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg,oGet &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cSeek:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BITMAP <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>cSeek &nbsp; &nbsp;:= Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">lBtnTransparent</span> :=.t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oGet:<span style="color: #000000;">bChange</span> &nbsp;:= <span style="color: #000000;">&#123;</span> ||ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span>,oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span><br />oGet:<span style="color: #000000;">assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cText</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">return</span> .t.</div>[/code:2h3acvlb]
show /hide a bitmap on a get
thanks LET ME WRITE ONLY ONE cR
show /hide a bitmap on a get
[code=fw:26y26dj6]<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;">&#40;</span><span style="color: #000000;">&#41;</span>        <br /> <br />   <span style="color: #00C800;">local</span> oDlg,oGet      <br />   <span style="color: #00C800;">local</span> cSeek:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><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;">"Test"</span>        <br /> <br />       @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />                 BITMAP <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span> ;<br />                 <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> cSeek := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>,;<br />                               ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>,;    <span style="color: #B900B9;">// ************* //</span><br />                               oGet:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// ************* //</span><br /><br />       oGet:<span style="color: #000000;">lBtnTransparent</span> :=.t.<br />       oGet:<span style="color: #000000;">bChange</span>  := <span style="color: #000000;">&#123;</span> || oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />       oGet:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> || oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br /><br />       @ <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">PIXEL</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;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span> , oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span><br /><br />   oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// ************* //</span><br /><br />   <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> cseek <span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">ELSE</span><br />      oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">return</span> .t.<br /> <span style="color: #B900B9;">//----------------------------------------------------------------------//</span></div>[/code:26y26dj6]
show /hide a bitmap on a get
[quote="Cgallegoa":36ygjsc6][code=fw:36ygjsc6]<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;">&#40;</span><span style="color: #000000;">&#41;</span>        <br /> <br />   <span style="color: #00C800;">local</span> oDlg,oGet      <br />   <span style="color: #00C800;">local</span> cSeek:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><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;">"Test"</span>        <br /> <br />       @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />                 BITMAP <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span> ;<br />                 <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> cSeek := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>,;<br />                               ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>,;    <span style="color: #B900B9;">// ************* //</span><br />                               oGet:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// ************* //</span><br /><br />       oGet:<span style="color: #000000;">lBtnTransparent</span> :=.t.<br />       oGet:<span style="color: #000000;">bChange</span>  := <span style="color: #000000;">&#123;</span> || oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />       oGet:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> || oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br /><br />       @ <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">PIXEL</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;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span> , oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span><br /><br />   oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// ************* //</span><br /><br />   <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> cseek <span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">ELSE</span><br />      oGet:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet:<span style="color: #000000;">cBmpName</span>:=<span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">return</span> .t.<br /> <span style="color: #B900B9;">//----------------------------------------------------------------------//</span></div>[/code:36ygjsc6][/quote:36ygjsc6] It run ok onky when I write a text after I delete it init from ++ space [b:36ygjsc6]1) write a text [/b:36ygjsc6] [img:36ygjsc6]https&#58;//i&#46;postimg&#46;cc/v89Kh3jT/1&#46;png[/img:36ygjsc6] [b:36ygjsc6]2) press the button and the text is deleted [/b:36ygjsc6] [img:36ygjsc6]https&#58;//i&#46;postimg&#46;cc/gcXxT6qn/2&#46;png[/img:36ygjsc6] [b:36ygjsc6]3) I insert a new text , but it init from position 0 + 4 [/b:36ygjsc6] [img:36ygjsc6]https&#58;//i&#46;postimg&#46;cc/3NnfGbSx/3&#46;png[/img:36ygjsc6] then if I delete also , the text init from 0 position + 8
show /hide a bitmap on a get
Silvio: [code=fw:1ur660rl]<div class="fw" id="{CB}" style="font-family: monospace;">     @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />                 BITMAP <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span> ;<br />                 <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> cSeek := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>,;<br />                               ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>,;    <span style="color: #B900B9;">// ************* //</span><br />                               oGet:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// ***  oGet:SetPos(0) puts de curson in pos 0 after click on Del bitmap *** //</span><br /> </div>[/code:1ur660rl] Working ok on xHarbour and FWH 20.07 [img:1ur660rl]https&#58;//i&#46;postimg&#46;cc/P5G2Z6Cy/Test-Silvio&#46;gif[/img:1ur660rl]
show /hide a bitmap on a get
[quote="Cgallegoa":3ujcrf2k]Silvio: [code=fw:3ujcrf2k]<div class="fw" id="{CB}" style="font-family: monospace;">     @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />                 BITMAP <span style="color: #ff0000;">"d:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\d</span>elete.bmp"</span> ;<br />                 <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> cSeek := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>,;<br />                               ChangeGetBtn<span style="color: #000000;">&#40;</span>oGet,cseek<span style="color: #000000;">&#41;</span>,;    <span style="color: #B900B9;">// ************* //</span><br />                               oGet:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// ***  oGet:SetPos(0) puts de curson in pos 0 after click on Del bitmap *** //</span><br /> </div>[/code:3ujcrf2k] Working ok on xHarbour and FWH 20.07 [img:3ujcrf2k]https&#58;//i&#46;postimg&#46;cc/P5G2Z6Cy/Test-Silvio&#46;gif[/img:3ujcrf2k][/quote:3ujcrf2k] now run ok only I have a xbrowse search and before not run ok
show BITMAP
When I run this program the error message shown: Message not found TBITMAP:DISPBEGIN stack calls: __ERRRT_SBASE(0) ...... #include "FWCE.ch" function Main() local oWnd DEFINE WINDOW oWnd TITLE "Bmp-Res" * @ 10, 20 BITMAP RESOURCE "users" SIZE 60, 60 && working @ 10, 20 BITMAP filename CURDIR()+"\users.bmp" SIZE 60, 60 && does't working ACTIVATE WINDOW oWnd return nil tnx for help, Darjo
show BITMAP
Darjo, Please download a new FWPPC we have just published that should fix that problem. Thanks.
show BITMAP
Antonio, thank you for quick answer. I installed new version. Now is better. But now is black border around picture - the shown picture is greater then original ??? regards, Darjo
show BITMAP
Darjo, Fixed. Please download and install FWPPC again <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Thanks for your feedback,
show DELETED Record in XBROWSE
hi, i want to shsw DELETED Record so i use [code=fw:360zqrob]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;  SET DELETED OFF<br />   BrowseDBF<span style="color: #000000;">&#40;</span> cPath, cFile, cAlias, cRdd <span style="color: #000000;">&#41;</span><br />   SET DELETED <span style="color: #0000ff;">ON</span></div>[/code:360zqrob] but when call [code=fw:360zqrob]<div class="fw" id="{CB}" style="font-family: monospace;">   oBrwDBF:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// what is Parameter .T. for ?</span></div>[/code:360zqrob] i got a "YesNo Box" and after "Yes" Record disappear in XBROWSE ... <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> so how configure XBROWSE to "show" DELETED Record which i can RECALL <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> p.s. open DBF have no Index
show DELETED Record in XBROWSE
hi, did nobody have a Solution to "show" DELETED Record in XBROWSE <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
show DELETED Record in XBROWSE
I am just starting my work. Pls wait
show DELETED Record in XBROWSE
[quote:29su1z03] what is Parameter .T. for ?[/quote:29su1z03] Syntax: [code=fw:29su1z03]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span>lMessage<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span></div>[/code:29su1z03] If the lMessage parameter is .T., a MsgeYesNo() box is displayed and only if the user selects "Yes", the Record is deleted() Otherwise, the record is deleted without any message. If SET DELETED IS ON, deleted records are not displayed and after deletion, the deleted record goes out sight. If SET DELETED IS OFF, all deleted records appear and [b:29su1z03]even after deletion, the record still appears[/b:29su1z03]. We confirm this behavior. If in your case, after deletion, the record disappears, Set Deleted might be ON at that time. We request you to recheck your program.
show DELETED Record in XBROWSE
Test Program [code=fw:14uryznk]<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;">"set.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oBar, oChk<br /><br />   COPY FILE STATES.DBF <span style="color: #0000ff;">TO</span> STATES2.DBF<br /><br />   USE STATES2 <span style="color: #00C800;">NEW</span> SHARED VIA <span style="color: #ff0000;">"DBFNTX"</span><br />   SET DELETED OFF<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span> <span style="color: #000000;">2007</span><br /><br />   @ <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE <span style="color: #ff0000;">"STATES2"</span> ;<br />      COLUMNS <span style="color: #ff0000;">"DELETED() AS DELETED"</span>,<span style="color: #ff0000;">"CODE"</span>,<span style="color: #ff0000;">"NAME"</span> ;<br />      CELL LINES NOBORDER<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">RecSelShowRecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">Deleted</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span>,.t.<span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, ;<br />            <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, CLR_HGRAY, CLR_WHITE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Delete"</span> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Recall"</span> <span style="color: #0000ff;">CENTER</span> ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .and. oBrw:<span style="color: #000000;">Lock</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                  DBRECALL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                  oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"SET DELETED"</span> <span style="color: #0000ff;">CENTER</span> ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>Set<span style="color: #000000;">&#40;</span>_SET_DELETED,!Set<span style="color: #000000;">&#40;</span>_SET_DELETED<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,;<br />      oBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   oBar:<span style="color: #000000;">bPainted</span>  := <span style="color: #000000;">&#123;</span> || oBar:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DELETED "</span> + ;<br />      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Set<span style="color: #000000;">&#40;</span>_SET_DELETED<span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"ON"</span>, <span style="color: #ff0000;">"OFF"</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#123;</span>,,,<span style="color: #000000;">-30</span><span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"R"</span>,,CLR_HRED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</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></div>[/code:14uryznk] [url=https&#58;//imageshack&#46;com/i/pnAEvFzDg:14uryznk][img:14uryznk]https&#58;//imagizer&#46;imageshack&#46;com/img923/7585/AEvFzD&#46;gif[/img:14uryznk][/url:14uryznk]
show DELETED Record in XBROWSE
hi, you Sample work i saw these Line [code=fw:3crkmqnp]<div class="fw" id="{CB}" style="font-family: monospace;">    COLUMNS <span style="color: #ff0000;">"DELETED() AS DELETED"</span>,<span style="color: #ff0000;">"CODE"</span>,<span style="color: #ff0000;">"NAME"</span> ;<br /><br />   :<span style="color: #000000;">RecSelShowRecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   :<span style="color: #000000;">Deleted</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span>,.t.<span style="color: #000000;">&#41;</span></div>[/code:3crkmqnp] Sample need COLUMNS "DELETED() AS DELETED" ... but i don´t know Column as i don´t have "fix" DBF i do use [code=fw:3crkmqnp]<div class="fw" id="{CB}" style="font-family: monospace;">   COLUMNS ColsNumber<span style="color: #000000;">&#40;</span> DBSTRUCT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;</div>[/code:3crkmqnp] hm ... can i build a String of COLUMNS before create XBROWSE, will that work <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> -- i have add Msginfo(() before ACTIVATE [code=fw:3crkmqnp]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" DETELED IS "</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Set<span style="color: #000000;">&#40;</span>_SET_DELETED<span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"ON"</span>, <span style="color: #ff0000;">"OFF"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> </div>[/code:3crkmqnp] just to be sure that DELETED if OFF but still i do not seen any DELETED Record in XBROWSE ... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> [code=fw:3crkmqnp]<div class="fw" id="{CB}" style="font-family: monospace;">      @ nBhight,  <span style="color: #000000;">2</span> <span style="color: #0000ff;">XBROWSE</span> oBrwDBF <span style="color: #0000ff;">SIZE</span> nWidth - <span style="color: #000000;">20</span>, nHeight - <span style="color: #000000;">90</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />              DATASOURCE cAlias ;                 <span style="color: #B900B9;">// ALIAS cAlias</span><br />              COLUMNS ColsNumber<span style="color: #000000;">&#40;</span> DBSTRUCT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />              <span style="color: #0000ff;">FONT</span> oFontDefault ;<br />              <span style="color: #0000ff;">COLOR</span> BFcolor, BGcolor ;<br />              CELL LINES NOBORDER FASTEDIT <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT<br /><br />      oBrwDBF:<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_WIDEST<br /><br />      oBrwDBF:<span style="color: #000000;">lRecordSelector</span> := .F.<br />      oBrwDBF:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span> || SayStatusDBF<span style="color: #000000;">&#40;</span> oBrwDBF, oGet, @nVar <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      oBrwDBF:<span style="color: #000000;">bOnSort</span> := <span style="color: #000000;">&#123;</span> || oBrwDBF:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />      <span style="color: #B900B9;">// oBrwDBF:bClrEdit     := { || { BFcolor, BGcolor } }</span><br />      oBrwDBF:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> BFcolor, BGcolor <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />      <span style="color: #B900B9;">// oBrwDBF:bClrSel      := { || { BFcolor, BGcolor } }</span><br />      oBrwDBF:<span style="color: #000000;">bClrHeader</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> BFcolor, BGcolor <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />      <span style="color: #B900B9;">// oBrwDBF:bClrFooter   := { || { BFcolor, BGcolor } }</span><br />      <span style="color: #B900B9;">// oBrwDBF:bClrSelFocus := { || { CLR_WHITE, GetSysColor( COLOR_MENUHILIGHT ) } }</span><br />      oBrwDBF:<span style="color: #000000;">bClrGrad</span> := bGradient<br /><br />      <span style="color: #B900B9;">// edit CELL</span><br />      <span style="color: #B900B9;">// oBrwDBF:nEditTypes := EDIT_GET</span><br />      <span style="color: #B900B9;">// override F2 CELL edit</span><br />      <span style="color: #B900B9;">// oBrwDBF:lF2KeyToEdit := .T.</span><br /><br />      * oBrwDBF:<span style="color: #000000;">RecSelShowRecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      * oBrwDBF:<span style="color: #000000;">Deleted</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span>,.t.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// COLUMNS "DELETED() AS DELETED",</span><br /><br />      oBrwDBF:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3crkmqnp] what i´m doing wrong that DELETED Record are not show in XBROWSE will try to make Sample
show DELETED Record in XBROWSE
hi, found a Solution for "me" , but not able to make a Sample in my MAIN i have [code=fw:3h5j63m7]<div class="fw" id="{CB}" style="font-family: monospace;">   SET DELETED <span style="color: #0000ff;">ON</span></div>[/code:3h5j63m7] i have try this [code=fw:3h5j63m7]<div class="fw" id="{CB}" style="font-family: monospace;">   USE <span style="color: #000000;">&#40;</span>cDBF<span style="color: #000000;">&#41;</span><br />   SET DELETED OFF</div>[/code:3h5j63m7] so it was AFTER open DBF ... this make the funny Effect that MsgInfo say "OFF" but DBF "react" like "ON" now when change to [code=fw:3h5j63m7]<div class="fw" id="{CB}" style="font-family: monospace;">   SET DELETED OFF <br />   USE <span style="color: #000000;">&#40;</span>cDBF<span style="color: #000000;">&#41;</span></div>[/code:3h5j63m7] it work <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> but as i say i can´t reproduce it in a small Sample
show DELETED Record in XBROWSE
Whatever happens to your end, you should be able to reproduce with a sample. Like whatever we said, we proved with a sample.
show DELETED Record in XBROWSE
Whatever happens to your end, you should be able to reproduce with a sample. Like whatever we said, we proved with a sample.
show DELETED Record in XBROWSE
If you can please clarify my doubt, I am interested in knowing this: In case of Clipper/Harbour, SET DELETED OFF/ON is a Global (application wide) setting, whereas in case of Dbase/FoxPro, this setting is a workarea wise setting. That means, in this code: [code=fw:18qhe15i]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">1</span><br />SET DELETED OFF<br /><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">2</span><br />SET DELETED <span style="color: #0000ff;">ON</span><br /><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">1</span><br /><span style="color: #B900B9;">// now whatis the status?</span><br /><span style="color: #B900B9;">// In Clipper/Harbour, it is ON</span><br /><span style="color: #B900B9;">// In DBase/FoxPrro is OFF</span><br /><span style="color: #B900B9;">// In Xbase++ ???</span><br />&nbsp;</div>[/code:18qhe15i] Can you kindly clarify if XBase++ is compatible with Dbase/FoxPro behavior or Clipper/Harbour behavior?
show DELETED Record in XBROWSE
hi, Xbase++ SET DELETED OFF/ON are Global (application wide) setting, even in Thread which have a other "Workspacelist" i can send you hole Project as i´mm not able (yet) to build a Sample which same Effect. it doesn´t matter in "this" Project as DUALGRID but for other Project i have to find out what is going on
show DELETED Record in XBROWSE
Yes, please. Though I am not sure if can understand.
show a bitmap
I want show a bitmap on xbrowse I make a simply dbf with this structure cod c 4 bitmap c 60 on firstrecord there is cod bitmap 1 .\bitmaps\test1.bmp Can I show this dbf on a xbrowse showing the bitmap ?
show a bitmap
Hello Silvio, The Bitmap-Preview and Edit : [img:205l737e]http&#58;//www&#46;pflegeplus&#46;com/pictures/bmpedit1&#46;jpg[/img:205l737e] [code=fw:205l737e]<div class="fw" id="{CB}" style="font-family: monospace;"><br />DBSELECTAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />oLbx70 := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />oLbx70:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br />oLbx70:<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_BLACK<br />oLbx70:<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_BLACK<br /><br />oLbx70:<span style="color: #000000;">bClrSelFocus</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <br />oLbx70:<span style="color: #000000;">bClrSel</span> = <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">10853885</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <br />oLbx70:<span style="color: #000000;">nRecSelColor</span> = <span style="color: #000000;">15512898</span> <br /><br />oLbx70:<span style="color: #000000;">lHScroll</span> := .F.<br />oLbx70:<span style="color: #000000;">lVScroll</span> := .T.<br />oLbx70:<span style="color: #000000;">lFooter</span> := .T.<br />oLbx70:<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">40</span><br />oLbx70:<span style="color: #000000;">nFooterHeight</span> := <span style="color: #000000;">7</span><br /><br /><span style="color: #B900B9;">// BMP - Number</span><br /><br />oCol := oLbx70:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">cHeader</span>  := <span style="color: #ff0000;">"No."</span><br />oCol:<span style="color: #000000;">bStrData</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->POSITION <span style="color: #000000;">&#125;</span><br />oCol:<span style="color: #000000;">nWidth</span>  := <span style="color: #000000;">25</span><br /><br /><span style="color: #B900B9;">// BMP - Picture</span><br /><br />oCol := oLbx70:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">cHeader</span>  := <span style="color: #ff0000;">"Bmp"</span><br />oCol:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">50</span><br />oCol:<span style="color: #000000;">nEditType</span>  := TYPE_IMAGE<br />oCol:<span style="color: #000000;">lBmpStretch</span>  := .f.<br />oCol:<span style="color: #000000;">lBmpTransparent</span> := .t.<br />oCol:<span style="color: #000000;">nDataBmpAlign</span> := AL_CENTER<br />oCol:<span style="color: #000000;">bStrImage</span> := <span style="color: #000000;">&#123;</span>|oCol, oLbx70| ALLTRIM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->FILE<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// BMP - File</span><br /><br />oCol := oLbx70:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">cHeader</span>  := <span style="color: #ff0000;">"File"</span><br />oCol:<span style="color: #000000;">bStrData</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->FILE <span style="color: #000000;">&#125;</span><br />oCol:<span style="color: #000000;">nWidth</span>  := <span style="color: #000000;">365</span><br />oCol:<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br />oCol:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|nRow, nCol, oCol| oCol:<span style="color: #000000;">Value</span> := GET_BMP<span style="color: #000000;">&#40;</span>oLbx70<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// BMP - Top</span><br /><br />oCol := oLbx70:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">cHeader</span>  := <span style="color: #ff0000;">"Top"</span><br />oCol:<span style="color: #000000;">bStrData</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->TOPPOS <span style="color: #000000;">&#125;</span><br />oCol:<span style="color: #000000;">nWidth</span>  := <span style="color: #000000;">40</span><br />oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />oCol:<span style="color: #000000;">nEditType</span> := EDIT_GET <br />oCol:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">&#123;</span>|o, v| <span style="color: #000000;">&#40;</span>DBRLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->TOPPOS := v, DBUNLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// BMP - Left</span><br /><br />oCol := oLbx70:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">cHeader</span>  := <span style="color: #ff0000;">"Left"</span><br />oCol:<span style="color: #000000;">bStrData</span>  := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->LEFTPOS <span style="color: #000000;">&#125;</span><br />oCol:<span style="color: #000000;">nWidth</span>  := <span style="color: #000000;">40</span><br />oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />oCol:<span style="color: #000000;">nEditType</span> := EDIT_GET <br />oCol:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">&#123;</span>|o, v| <span style="color: #000000;">&#40;</span>DBRLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->LEFTPOS := v, DBUNLOCK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />aClrCol := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">16645846</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">16512964</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />oLbx70:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || aClrCol<span style="color: #000000;">&#91;</span> oLbx70:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <br /><br />oLbx70:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">110</span> <span style="color: #000000;">&#41;</span><br />...<br />...<br /><span style="color: #B900B9;">// ----------------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> GET_BMP<span style="color: #000000;">&#40;</span> oLbx70 <span style="color: #000000;">&#41;</span><br />cBMP := cGetFile32<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BMP (*.bmp)|*.bmp|"</span>,<span style="color: #ff0000;">"Select a Picture"</span> ,, <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> + CurDir() + "</span>\<span style="color: #0000ff;">IMAGES</span>\<span style="color: #ff0000;">")<br />DBRLOCK() <br />(1)->FILE := cBMP<br />DBUNLOCK() <br />RETURN ( cBMP )<br /> </span></div>[/code:205l737e] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
show a bitmap
thanks a lot!
show a bitmap
Silvio, a mistake in writing, for changing a BMP : Must be the Filename and not the BMP-Field [color=#FF0000:m3ifqu5i]oCol:bStrImage [/color:m3ifqu5i]:= {|oCol, oLbx70| [color=#FF0000:m3ifqu5i]ALLTRIM((1)->FILE)[/color:m3ifqu5i] } Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
show a bitmap
this afternoon I try it thanks
show a btnbmp pressed on buttonbar
Dear Silvio, mira C:\FWH..\SAMPLES\TESTSK1.PRG si ayuda. Regards, saludos.
show a btnbmp pressed on buttonbar
Estimado Silvio, única forma en que logré hacerlo funcionar. Dear Silvio, only way I managed to make it work. [code=fw:93ly2ivb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\GRADSIL.PRG</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> K_F5 &nbsp;<span style="color: #000000;">&#40;</span><span style="color: #000000;">-4</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#Define</span> aPubGrad <span style="color: #000000;">&#123;</span>| lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span> / <span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span> / <span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, &nbsp;<span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span> / <span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">219</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">244</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">207</span> - <span style="color: #000000;">50</span>, <span style="color: #000000;">221</span> - <span style="color: #000000;">25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span> / <span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span> - <span style="color: #000000;">50</span>, <span style="color: #000000;">217</span> - <span style="color: #000000;">25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd, oBmp, oBtn1, oBtn2, oBtn3, oBtn4, oBtn5, oBtn6, oBtn7, oBtn8, oBtn9<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrush, oBar, hDLL<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSkinB<br /><br />&nbsp; &nbsp;SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;oSkinB = TSkinButton<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oSkinB:<span style="color: #000000;">nClrBorder0_N</span> = RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">249</span>, <span style="color: #000000;">194</span>, <span style="color: #000000;">179</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oSkinB:<span style="color: #000000;">nClrBorder1_N</span> = RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">181</span>, <span style="color: #000000;">61</span>, <span style="color: #000000;">29</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oSkinB:<span style="color: #000000;">aClrNormal</span> &nbsp; &nbsp;= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.2</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">254</span>, <span style="color: #000000;">154</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">254</span>, <span style="color: #000000;">154</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.8</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">252</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">40</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">181</span>, <span style="color: #000000;">61</span>, <span style="color: #000000;">29</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;SkinButtons<span style="color: #000000;">&#40;</span> oSkinB <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// don't use VK_F5 because VK_F5 and 't' have the same code !</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// for VK_F5 use Clipper's K_F5</span><br />&nbsp; &nbsp;SetKey<span style="color: #000000;">&#40;</span> K_F5, <span style="color: #000000;">&#123;</span> || <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Testing SetKey feature..."</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">STYLE</span> BORLAND<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">75</span> <span style="color: #0000ff;">BRUSH</span> oBrush &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Cambiar los colores de los botones de ButtonBar"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span> &nbsp;BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">31</span>, <span style="color: #000000;">33</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #B900B9;">// 2007 // no use 2007/2015</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBar &nbsp;<span style="color: #B900B9;">// VER: ANCHO.PRG</span><br /><br />&nbsp; &nbsp; &nbsp; oBar:<span style="color: #000000;">bClrGrad</span> := aPubGrad<br /><br />&nbsp; &nbsp; &nbsp; oBar:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Botao direito &nbsp;do Mouse desligado.</span><br />&nbsp; &nbsp; &nbsp; oBar:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Botao Esquerdo do Mouse desligado.</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// oBar:SetFont( oFont )</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Cor no Prompt dos Botoes</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// oBar:nClrText := CLR_HBLUE // BLACK</span><br />&nbsp; &nbsp; &nbsp; oBar:<span style="color: #0000ff;">Adjust</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\S</span>elect.bmp"</span> <span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Testing a sample selection dialog"</span> NOBORDER &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Selection Dialog"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\E</span>dit.bmp"</span> &nbsp; <span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Testing a typical bussiness dialog"</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Images DataBase"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn3 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\B</span>rowse.bmp"</span> &nbsp; <span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Easy and powerfull Browsers"</span> NOBORDER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Browse"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn4 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\E</span>xit.bmp"</span> &nbsp; <span style="color: #0000ff;">OF</span> oBar &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> _Exit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"When you want to end"</span> &nbsp;NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Exit"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn5 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\C</span>olors.bmp"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> ChooseColor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Calling Windows standard color selection dialog"</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Colors"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn6 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\D</span>lg.bmp"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"*.dbf"</span>, <span style="color: #ff0000;">"Select a DBF"</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Calling Windows standard Get a File dialog"</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"GetFile"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn7 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\F</span>onts.bmp"</span> &nbsp;<span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">ACTION</span> ChooseFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Calling Windows standard font selection dialog"</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"GetFont"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn8 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\B</span>locks.bmp"</span> <span style="color: #0000ff;">OF</span> oBar GROUP ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"About FiveWin designers"</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"About"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn9 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\O</span>pen.bmp"</span> <span style="color: #0000ff;">OF</span> oBar ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> CAMBIA_COLOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Cambiar colores de los Buttons"</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Cambiar colores de los Buttons"</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp; @ 6, 18 BITMAP oBmp FILENAME "..\bitmaps\Luck.bmp" OF oWnd</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> BITMAP oBmp FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\f</span>iveback.bmp"</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">bPainted</span> = <span style="color: #000000;">&#123;</span> | hDC | BmpTiled<span style="color: #000000;">&#40;</span> hDC, oWnd, oBmp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"FiveWin - Cambiar los colores de los botones de ButtonBar!"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CAMBIA_COLOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nCor<br /><br />&nbsp; &nbsp;nCor := ChooseColor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn1:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn1:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn3:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn3:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn4:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn4:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn5:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn5:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn6:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn6:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn7:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn7:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn8:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn8:<span style="color: #000000;">nClrPane</span> := nCor<br /><br />&nbsp; &nbsp;oBtn9:<span style="color: #000000;">nClrText</span> := nCor<br />&nbsp; &nbsp;oBtn9:<span style="color: #000000;">nClrPane</span> := nCor<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMenu<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Some &Dialogs"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Make a selection..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"It's time to start building Windows applications easily!"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Now you have a real chance..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Quick and easy Windows applications using your Clipper!!!"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SEPARATOR</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"End..."</span> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Exit this demo"</span> <span style="color: #0000ff;">ACTION</span> _Exit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// UDF</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Some &Standards..."</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Choose A &Color..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Calling standard Windows dialogs"</span> <span style="color: #0000ff;">ACTION</span> ChooseColor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Getting a &file..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Hey, see how easy this is"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"*.dbf"</span>, <span style="color: #ff0000;">"Select a DBF"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Selecting a f&ont..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Any Windows facility is ready for you"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> ChooseFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"About..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Come on... we would like to see your name here soon!"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu<br /><br /><span style="color: #00C800;">function</span> _Exit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> BmpTiled<span style="color: #000000;">&#40;</span> hDC, oWnd, oBmp <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nWidth := oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nHeight := oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">0</span>, nCol := <span style="color: #000000;">0</span>, n<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nBmpWidth &nbsp;:= oBmp:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, &nbsp;nBmpHeight := oBmp:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oBmp:<span style="color: #000000;">hBitmap</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">while</span> nRow < nHeight<br />&nbsp; &nbsp; &nbsp; nCol = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">while</span> nCol < nWidth<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PalBmpDraw<span style="color: #000000;">&#40;</span> hDC, nRow, nCol, oBmp:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol += nBmpWidth<br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; nRow += nBmpHeight<br />&nbsp; &nbsp;end<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br />&nbsp;</div>[/code:93ly2ivb] Regards, saludos.
show a btnbmp pressed on buttonbar
[img:boljvyt3]https&#58;//i&#46;postimg&#46;cc/JnnLBckL/buttonbar&#46;png[/img:boljvyt3] On a buttonbar (2015) I have these btnbmps and I would like that when I press a button it stays pressed to simulate the select option , so I made DEFINE BUTTON oSelf:oPlus FILENAME ".\bitmaps\plus.bmp" OF ::oBar ; TOOLTIP "plus numbers" ; ACTION (oSelf:oPlus:lPressed:=!oSelf:oPlus:lPressed, oSelf:oPlus:refresh()) but it is pressed but not change the color how resolve?
show a btnbmp pressed on buttonbar
Dear Silvio, Maybe replacing the bitmap with another with different color ?
show a btnbmp pressed on buttonbar
[quote="Antonio Linares":3w430go3]Dear Silvio, Maybe replacing the bitmap with another with different color ?[/quote:3w430go3] I did not think about it but otherwise in the ribbonbar it does it automatically if you use lselected as you can see here [img:3w430go3]https&#58;//i&#46;postimg&#46;cc/wv9F0g55/ribbonbar&#46;png[/img:3w430go3] why on buttonbar not is the same ?
show a btnbmp pressed on buttonbar
I tried DEFINE BUTTON oSelf:oPlus FILENAME ".\bitmaps\plus.bmp" OF ::oBar ; TOOLTIP "plus numbers" ; ACTION (oSelf:oPlus:lPressed:=!oSelf:oPlus:lPressed,; oSelf:oPlus:setcolor( CLR_BLUE, If( oSelf:oPlus:lPressed == .t., CLR_RED, CLR_BLUE )) ,; oSelf:oPlus:refresh() but not run ok
show a btnbmp pressed on buttonbar
No I made DEFINE BUTTON oSelf:oPlus FILENAME ".\bitmaps\plus.bmp" OF ::oBar ; TOOLTIP "plus numbers" ; ACTION (ChangePressedBtn(oSelf:oPlus)) [code=fw:3iu79soi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> ChangePressedBtn<span style="color: #000000;">&#40;</span>oBtn<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> &nbsp;bClrGradSelect := <span style="color: #000000;">&#123;</span>| lPressed | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lPressed &nbsp;,;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #000000;">2</span>/<span style="color: #000000;">5</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">253</span>,<span style="color: #000000;">212</span>,<span style="color: #000000;">168</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">251</span>,<span style="color: #000000;">178</span>,<span style="color: #000000;">99</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><span style="color: #000000;">3</span>/<span style="color: #000000;">5</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">250</span>,<span style="color: #000000;">157</span>,<span style="color: #000000;">52</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">252</span>,<span style="color: #000000;">234</span>,<span style="color: #000000;">163</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #000000;">2</span>/<span style="color: #000000;">5</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">245</span>,<span style="color: #000000;">177</span>,<span style="color: #000000;">110</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">243</span>,<span style="color: #000000;">165</span>,<span style="color: #000000;">89</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><span style="color: #000000;">3</span>/<span style="color: #000000;">5</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">216</span>,<span style="color: #000000;">136</span>,<span style="color: #000000;">52</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">249</span>,<span style="color: #000000;">202</span>,<span style="color: #000000;">98</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> &nbsp;bClrGradNormal := <span style="color: #000000;">&#123;</span> | lPressed | <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> lPressed,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">5</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">194</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">242</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">194</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">242</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">3</span>/<span style="color: #000000;">5</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">194</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">242</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">194</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">242</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">5</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">3</span>/<span style="color: #000000;">5</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; oBtn:<span style="color: #000000;">lPressed</span>:=!oBtn:<span style="color: #000000;">lPressed</span><br /><br />&nbsp; &nbsp; ? &nbsp;oBtn:<span style="color: #000000;">lPressed</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> oBtn:<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style="color: #000000;">bClrGrad</span> &nbsp; &nbsp;:= bClrGradSelect<br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style="color: #000000;">bClrGrad</span> &nbsp; &nbsp;:= &nbsp;bClrGradNormal<br />&nbsp; &nbsp;<span style="color: #00C800;">Endif</span><br /><br /><br />&nbsp; &nbsp;oBtn:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3iu79soi] [img:3iu79soi]https&#58;//i&#46;postimg&#46;cc/SKtCz9QM/fff&#46;png[/img:3iu79soi] It run but when we put it back it doesn't take away the color maybe I did something wrong <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> lpressed is alway .t.
show a btnbmp pressed on buttonbar
Please try this test [code=fw:rculzpbd]<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> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oWnd<br /><span style="color: #00C800;">local</span> oBar,oPlus,oNumber,oCancel<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> &nbsp;oWnd<br /><br /><br />&nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar TOP &nbsp;<span style="color: #0000ff;">OF</span> oWnd &nbsp;<span style="color: #000000;">2015</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oNumber FILENAME <span style="color: #ff0000;">"one.bmp"</span> &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"one n umber"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> &nbsp;ChangePressedBtn<span style="color: #000000;">&#40;</span>oNumber<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oPlus FILENAME <span style="color: #ff0000;">"plus.bmp"</span> &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"plus numbers"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> ChangePressedBtn<span style="color: #000000;">&#40;</span>oPlus<span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oCancel &nbsp;FILENAME <span style="color: #ff0000;">"delete.bmp"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"cancel"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>ChangePressedBtn<span style="color: #000000;">&#40;</span>oPlus<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ChangePressedBtn<span style="color: #000000;">&#40;</span>oNumber<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ChangePressedBtn<span style="color: #000000;">&#40;</span>oBtn<span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #00C800;">local</span> &nbsp;bClrGradSelect := &nbsp; <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp;<span style="color: #00C800;">local</span> &nbsp;bClrGradNormal := &nbsp;<span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">Toggle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> oBtn:<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style="color: #000000;">bClrGrad</span> &nbsp; &nbsp;:= bClrGradSelect<br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style="color: #000000;">bClrGrad</span> &nbsp; &nbsp;:= &nbsp;bClrGradNormal<br />&nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br /><br />&nbsp; &nbsp; oBtn:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> ni</div>[/code:rculzpbd] [b:rculzpbd]plus.bmp[/b:rculzpbd] [img:rculzpbd]https&#58;//i&#46;postimg&#46;cc/PJ9XBPz7/plus&#46;png[/img:rculzpbd] [b:rculzpbd]one.bmp[/b:rculzpbd] [img:rculzpbd]https&#58;//i&#46;postimg&#46;cc/qBhzGTGF/one&#46;png[/img:rculzpbd] [b:rculzpbd]delete.bmp[/b:rculzpbd] [img:rculzpbd]https&#58;//i&#46;postimg&#46;cc/NFqY4Wsh/delete&#46;png[/img:rculzpbd] it seem run ok but when I press X (3th button) it not refresh
show a btnbmp pressed on buttonbar
I have a different thing. the two btnbmp are active through a logical variable lnumber, if it is active, oPlus must be activated, if it is negative, oNumber must be activated. Instead oCancel deselects both buttons and lnumber: = nil I just solved it like this [code=fw:35vof6kv]<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> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oWnd<br /><span style="color: #00C800;">local</span> oBar,oPlus,oNumber,oCancel<br /><span style="color: #00C800;">local</span> lNumber:=<span style="color: #00C800;">nil</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> &nbsp;oWnd<br /><br /><br />&nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar TOP &nbsp;<span style="color: #0000ff;">OF</span> oWnd &nbsp;<span style="color: #000000;">2015</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oNumber FILENAME <span style="color: #ff0000;">"one.bmp"</span> &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"one number"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> &nbsp;<span style="color: #000000;">&#40;</span> ChangePressedBtn<span style="color: #000000;">&#40;</span>oNumber<span style="color: #000000;">&#41;</span>, lNumber:=.f.<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oPlus FILENAME <span style="color: #ff0000;">"plus.bmp"</span> &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"plus numbers"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>ChangePressedBtn<span style="color: #000000;">&#40;</span>oPlus<span style="color: #000000;">&#41;</span>, lNumber:=.t.<span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oCancel &nbsp;FILENAME <span style="color: #ff0000;">"delete.bmp"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"cancel"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> &nbsp;AnnullaSelezione<span style="color: #000000;">&#40;</span>oPlus,oNumber,lNumber<span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ChangePressedBtn<span style="color: #000000;">&#40;</span>oBtn<span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #00C800;">local</span> &nbsp;bClrGradSelect := &nbsp; <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp;<span style="color: #00C800;">local</span> &nbsp;bClrGradNormal := &nbsp;<span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">Toggle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">If</span> oBtn:<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style="color: #000000;">bClrGrad</span> &nbsp; &nbsp;:= bClrGradSelect<br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style="color: #000000;">bClrGrad</span> &nbsp; &nbsp;:= &nbsp;bClrGradNormal<br />&nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br /><br />&nbsp; &nbsp; oBtn:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//--------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> AnnullaSelezione<span style="color: #000000;">&#40;</span>oPlus,oNumber,lNumber<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> lNumber !=<span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> lNumber<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ChangePressedBtn<span style="color: #000000;">&#40;</span>oPlus<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !lNumber<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ChangePressedBtn<span style="color: #000000;">&#40;</span>oNumber<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPlus:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oNumber:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Endif</span><br />&nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//--------------------------------------------------------/</span><br />&nbsp;</div>[/code:35vof6kv]
show a btnbmp pressed on buttonbar
Very good Silvio. Congratulations. Funciona mui bien. [code=fw:2jwpnyq4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\GRADSIL2.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> GRAD_BTN_BLACK <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.70</span>,<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;,<span style="color: #000000;">12429486</span> <span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.70</span>,<span style="color: #000000;">12429486</span>,<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.40</span>,<span style="color: #000000;">9928844</span>,<span style="color: #000000;">12429486</span> <span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.40</span>,<span style="color: #000000;">12429486</span>,<span style="color: #000000;">9928844</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#Define</span> aPubGrad &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, &nbsp;<span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">219</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">244</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">207</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">221</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">217</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#Define</span> aPubRedGr &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">16776960</span>,<span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">16776960</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">128</span>,<span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">128</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#Define</span> bGrad &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">230</span>, <span style="color: #000000;">234</span>, <span style="color: #000000;">239</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, &nbsp;<span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oBar, oPlus, oNumber, oCancel, oExit<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lNumber := <span style="color: #00C800;">nil</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> &nbsp;oWnd<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar TOP &nbsp;<span style="color: #0000ff;">OF</span> oWnd <span style="color: #000000;">2015</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oNumber FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\f</span>loppy.bmp"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"one number"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> ChangePressedBtn<span style="color: #000000;">&#40;</span> oNumber <span style="color: #000000;">&#41;</span>, lNumber := .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oPlus FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\p</span>lus.bmp"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"plus numbers"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> ChangePressedBtn<span style="color: #000000;">&#40;</span> oPlus <span style="color: #000000;">&#41;</span>, lNumber := .T. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oCancel &nbsp;FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\d</span>elete.bmp"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"cancel"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> &nbsp;AnnullaSelezione<span style="color: #000000;">&#40;</span> oPlus, oNumber, lNumber <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oExit &nbsp;FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\e</span>xit.bmp"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Salida - Exit - Cancelar"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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 /><br /><span style="color: #00C800;">FUNCTION</span> ChangePressedBtn<span style="color: #000000;">&#40;</span> oBtn <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> &nbsp;bClrGradSelect := &nbsp; <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> &nbsp;bClrGradNormal := &nbsp;<span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">244</span>, <span style="color: #000000;">245</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">247</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">Toggle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> oBtn:<span style="color: #000000;">lPressed</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// bGrad-aPubRedGr-aPubGrad-bClrGradSelect</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style="color: #000000;">bClrGrad</span> := GRAD_BTN_BLACK <span style="color: #B900B9;">// Bello.</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; oBtn:<span style="color: #000000;">bClrGrad</span> := bClrGradNormal<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;oBtn:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> AnnullaSelezione<span style="color: #000000;">&#40;</span> oPlus, oNumber, lNumber <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lNumber != <span style="color: #00C800;">nil</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> lNumber<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ChangePressedBtn<span style="color: #000000;">&#40;</span> oPlus <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !lNumber<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ChangePressedBtn<span style="color: #000000;">&#40;</span> oNumber <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; oPlus:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oNumber:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br />&nbsp;</div>[/code:2jwpnyq4] Regards, saludos.
show a calendar
Can I can make to show a calendar for only one month ? the user must not select another month only that I passed !!! and the use must Pick a date for that month sample september from 1 to 30
show a message then created a dialog and not before
I have a dialog at init go to add a array aItems I need on xbrowse from a function calcolo() if I make a check calcolo function have some message boxes I wish before create the dialog with all object and then the calcolo function can show the messages my problem is the message is showed before to create the dialog how I can resolve it ? I made a small test [code=fw:3bke4h3k]<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> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> odlg,oFolder,oPanelGreen<br /><span style="color: #00C800;">Local</span> aItems:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> oBrowse<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"test"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1120</span>,<span style="color: #000000;">650</span> ;<br />             <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> FOLDEREX oFolder <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-585</span>,oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-390</span> <span style="color: #0000ff;">PIXEL</span>  ;<br />        <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Reservation"</span>,<span style="color: #ff0000;">"Payments"</span><br /><br /><br />     @ <span style="color: #000000;">100</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">XBROWSE</span>  oBrowse <span style="color: #0000ff;">OF</span> oFolder:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> ;<br />       ARRAY aItems       ;<br />        <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">90</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER<br /><br />         WITH OBJECT oBrowse<br />            :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    END<br /><br /><br /><br /><br /><br /><br /><br /><br />         oDlg:<span style="color: #000000;">bResized</span>  := <||<br />                <span style="color: #00C800;">local</span> oRect    := oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                oFolder:<span style="color: #000000;">nWidth</span>     := oRect:<span style="color: #000000;">nRight</span><span style="color: #000000;">-2</span><br />                oFolder:<span style="color: #000000;">nHeight</span>    := oRect:<span style="color: #000000;">nBottom</span><span style="color: #000000;">-60</span><br /><br />                oPanelGreen:<span style="color: #000000;">nTop</span>   := oRect:<span style="color: #000000;">ntop</span> <span style="color: #000000;">+80</span><br />                oPanelGreen:<span style="color: #000000;">nLeft</span>  := oRect:<span style="color: #000000;">nleft</span><span style="color: #000000;">+5</span><br />                oPanelGreen:<span style="color: #000000;">nwidth</span> := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">20</span><br /><br />                oBrowse:<span style="color: #000000;">nTop</span>      := oRect:<span style="color: #000000;">nBottom</span><span style="color: #000000;">-350</span><br />                oBrowse:<span style="color: #000000;">nWidth</span>    := oRect:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">15</span><br />               <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />                  ><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: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oPanelGreen  := PanelGreen<span style="color: #000000;">&#40;</span>oFolder<span style="color: #000000;">&#41;</span>,;<br />                 Calcolo<span style="color: #000000;">&#40;</span>@aItems<span style="color: #000000;">&#41;</span>,EVAL<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">bResized</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------//</span><br /> <span style="color: #00C800;">function</span> PanelGreen<span style="color: #000000;">&#40;</span>oFld<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> oPanel,oBrushGreen<br />  <span style="color: #00C800;">Local</span> aGradgreen := <span style="color: #000000;">&#123;</span> Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">225</span>,<span style="color: #000000;">239</span>,<span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span>,Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">225</span>,<span style="color: #000000;">239</span>,<span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrushGreen GRADIENT aGradgreen<br />     oPanel:=Tpanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">75</span>, oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-5</span>, oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />     oPanel:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrushGreen <span style="color: #000000;">&#41;</span><br />     oPanel:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">&#123;</span> || oPanel:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,oPanel:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-1</span>,oPanel:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />     <span style="color: #00C800;">return</span> oPanel<br /><span style="color: #B900B9;">//-----------------------------------------------//</span><br /><br /><br /><span style="color: #00C800;">function</span> Calcolo<span style="color: #000000;">&#40;</span>aItems<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"wwww"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">return</span> aItems<br /><span style="color: #B900B9;">//-----------------------------------------------//</span></div>[/code:3bke4h3k]
show a message then created a dialog and not before
Silvio, just change to : ..... ..... [color=#0000FF:3vz3u1wb]oDlg:bPainted := {||Calcolo(@aItems) }[/color:3vz3u1wb] ACTIVATE DIALOG oDlg CENTERED; ON INIT ( oPanelGreen := PanelGreen(oFolder),; EVAL( oDlg:bResized)) regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
show a message then created a dialog and not before
each time I resize it come the message ...no good
show a message then created a dialog and not before
Silvio, You can use a var that will show the message only at once. [color=#0000FF:1pfimoaw]lMessage := .F. oDlg:bPainted := {|| IIF( lMessage = .F., ( Calcolo(@aItems), lMessage := .T.), NIL ) }[/color:1pfimoaw] regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
show a message then created a dialog and not before
goods <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> it an good idea
show a message then created a dialog and not before
oDlg:[b:feawwdws]bStart[/b:feawwdws] := {||Calcolo(@aItems) }
show a string into xbrowse
I have a field numeric and I wish show the string + "gg" :bEditValue :={ || str(oBrw:aArrayData[ oBrw:nArrayAt,1])+"gg" } why not run ?
show a string into xbrowse
Simpler way is: [code=fw:1rbl2xve]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"###gg"</span></div>[/code:1rbl2xve]
show a string into xbrowse
[quote="nageswaragunupudi":3mt5lv3t]Simpler way is: [code=fw:3mt5lv3t]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"###gg"</span></div>[/code:3mt5lv3t][/quote:3mt5lv3t] run only the last element [img:3mt5lv3t]https&#58;//i&#46;postimg&#46;cc/jqckNKDN/kio&#46;png[/img:3mt5lv3t] sample cstring:= "30/60/90" aData := hb_ATokens(cString,"/") @ 10, 5 XBROWSE oBrw OF oDlg ; COLUMNS 1,2; HEADERS "gg","" ; COLSIZES 40, 220 ; ARRAY aData ; SIZE -5,-100 PIXEL STYLE FLAT NOBORDER WITH OBJECT oBrw WITH OBJECT oBrw:aCols[1] :cEditPicture := "###gg" END :lHScroll := .f. :CreateFromCode() END
show a string into xbrowse
[quote:mnyfuqhx]I have a field numeric and I wish show the string + "gg"[/quote:mnyfuqhx] Your question was to display "numeric" values with suffix "gg". The suggestion of oCol:cEditPicture := "###gg" works for numeric values but not character values In your code: [code=fw:mnyfuqhx]<div class="fw" id="{CB}" style="font-family: monospace;">cstring:= <span style="color: #ff0000;">"30/60/90"</span><br /><br />aData := hb_ATokens<span style="color: #000000;">&#40;</span>cString,<span style="color: #ff0000;">"/"</span><span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">10</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ;<br />COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>;<br />HEADERS <span style="color: #ff0000;">"gg"</span>,<span style="color: #ff0000;">""</span> ;<br />COLSIZES <span style="color: #000000;">40</span>, <span style="color: #000000;">220</span> ;<br />ARRAY aData ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-5</span>,<span style="color: #000000;">-100</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER<br /><br />WITH OBJECT oBrw<br />WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"###gg"</span><br />END<br />:<span style="color: #000000;">lHScroll</span> := .f.<br />:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />END<br />&nbsp;</div>[/code:mnyfuqhx] all elements of aData are character values. So please do: [code=fw:mnyfuqhx]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; aData := HB_ATokens<span style="color: #000000;">&#40;</span> cString, <span style="color: #ff0000;">"/"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |c,i| aData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := Val<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:mnyfuqhx]
show a string into xbrowse
thanks
show bitmap on window/dialog
A possible Solution : 1. You start with a defined Archive on the right hand side. 2. Define the Area for Painting ( use Gradient-Fill for Borders ) [img:wqkj0ros]http&#58;//www&#46;pflegeplus&#46;com/pictures/planner1&#46;jpg[/img:wqkj0ros] 3. You move as many Objects You like from the Archive to a defined Position 4. Activate / Deactivate with Right Mouseclick 5. Save the Positions to a DBF ( can be done on Button-Action ) 6. Reset restores Objects to the Archive on Basic-Positions. [img:wqkj0ros]http&#58;//www&#46;pflegeplus&#46;com/pictures/planner2&#46;jpg[/img:wqkj0ros] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
show bitmap on window/dialog
I must show many tables for a restaurant 1. I need each bitmaps transparent 2. each bitmap must be move on the winow from user ( design) to create a configuration of rooms with all tables 3. each bitmap must change image if the user change sample green = free red = no free .... as tsbutton made I try to use sbutton but I have some problem with tsbutton 7.0 ( when I use design clausole it create a box arround the bmp making smaller the bitmap ) If i use fwh native classes wich class I can use to create it and I can have a test sample how make it ?
show bitmaps on Header and columns with Xbrowse
To create a column in xbrowse I use this line oCol:= oApp():oGrid:AddCol() oCol:AddResource("sort1") oCol:AddResource("sort2") oCol:AddResource("GRADO1") oCol:AddResource("GRADO2") oCol:AddResource("GRADO3") oCol:AddResource("GRADO4") oCol:AddResource("GRADO5") oCol:AddResource("GRADO6") oCol:AddResource("GRADO7") oCol:AddResource("GRADO8") oCol:AddResource("GRADO0") oCol:cHeader := "Grado" oCol:bStrData := { || (oDCli)->GRADO} oCol:bBmpData := { || (oDCli)->GRADO} oCol:nWidth :=40 oCol:bLClickHeader :={ ||(Sel_Index(5,oDCli) ,; oApp():oTab:nOption:=5,; oApp():oTab:refresh()) } Problem : I want use for show bitmaps on column from 3° bitmap to 11° bitmap [b:2qar9cwg]oCol:AddResource("GRADO1") oCol:AddResource("GRADO2") oCol:AddResource("GRADO3") oCol:AddResource("GRADO4") oCol:AddResource("GRADO5") oCol:AddResource("GRADO6") oCol:AddResource("GRADO7") oCol:AddResource("GRADO8") oCol:AddResource("GRADO0")[/b:2qar9cwg] and the first and second bitmap only for the header : [b:2qar9cwg] oCol:AddResource("sort1") oCol:AddResource("sort2")[/b:2qar9cwg] the field oCol:bStrData := { || (oDCli)->GRADO} is numeric ( N 1) How I can make it ? Someone can help me please ?
show bitmaps on Header and columns with Xbrowse
[b:3rhh0g7l]for change bitmap on header use...[/b:3rhh0g7l] DATA nHeadBmpNo // header ordinal bitmap to use of ::aBitmaps [b:3rhh0g7l]for change bitmap on cell use...[/b:3rhh0g7l] bBmpData // Ordinal bitmap data codeblock (returns a number in the range 1-len(aBitmaps)) use original fivewin bitmap, from folder \FWH\bitmaps\16x16 [code:3rhh0g7l] #include "FiveWin&#46;ch" #include "xbrowse&#46;ch" // xbrowse imagen button get static aCellSelected function main() local oDlg, oBrw local aArray &#58;= {} local uVal local nI local oGet, oBtn local nWdGet &#58;= 0 for nI = 1 to 20 aadd( aArray, { StrZero(nI,2),; 3,; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ),; SPACE( 5 ) } ) next DEFINE DIALOG oDlg Title "Test xBrowse III " size 700,300 oBrw&#58;= txbrowse()&#58;new( oDlg ) oBrw&#58;nRowHeight &#58;= 25 oBrw&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLCELL //MARQSTYLE_HIGHLROWMS // oBrw&#58;SetArray( aArray ) oBrw&#58;lFastEdit = &#46;t&#46; oBrw&#58;CreateFromCode() for nI = 2 to len( oBrw&#58;aCols ) oBrw&#58;aCols&#91; nI &#93;&#58;AddBmpFile( "gobottom&#46;bmp" ) oBrw&#58;aCols&#91; nI &#93;&#58;AddBmpFile( "gotop&#46;bmp" ) oBrw&#58;aCols&#91; nI &#93;&#58;bLClickHeader &#58;= { | nRow, nCol, nFlags, oCol | if ( oCol&#58;nHeadBmpNo == 1, oCol&#58;nHeadBmpNo &#58;= 2, oCol&#58;nHeadBmpNo &#58;= 1 ) } oBrw&#58;aCols&#91; nI &#93;&#58;nHeadBmpNo &#58;= 1 next oBrw&#58;aCols&#91; 2 &#93;&#58;AddBmpFile( "textbox&#46;bmp" ) oBrw&#58;aCols&#91; 2 &#93;&#58;AddBmpFile( "tips&#46;bmp" ) oBrw&#58;aCols&#91; 2 &#93;&#58;AddBmpFile( "toback&#46;bmp" ) oBrw&#58;aCols&#91; 2 &#93;&#58;AddBmpFile( "tofront&#46;bmp" ) oBrw&#58;aCols&#91; 2 &#93;&#58;AddBmpFile( "toggle&#46;bmp" ) oBrw&#58;aCols&#91; 2 &#93;&#58;AddBmpFile( "togrid&#46;bmp" ) oBrw&#58;aCols&#91; 2 &#93;&#58;nEditType &#58;= EDIT_GET oBrw&#58;aCols&#91; 2 &#93;&#58;bBmpData &#58;= {|| if( empty( oBrw&#58;aCols&#91; 2 &#93;&#58;value() ), 1, oBrw&#58;aCols&#91; 2 &#93;&#58;value() ) } oBrw&#58;aCols&#91; 2 &#93;&#58;bEditValid &#58;= {| oEdit | oEdit&#58;value() > 2 } oDlg&#58;oClient &#58;= oBrw ACTIVATE DIALOG oDlg center on init oDlg&#58;Resize() return nil [/code:3rhh0g7l]
show bitmaps on Header and columns with Xbrowse
your sample run ok but I must correction this sources oCol:= oApp():oGrid:AddCol() oCol:AddResource("sort1") oCol:AddResource("sort2") oCol:nHeadBmpNo := 2 oCol:nHeadBmpAlign := AL_RIGHT oCol:bLClickHeader :={ ||(Sel_Index(7,oDCli) , oApp():oTab:nOption:=7,oApp():oTab:refresh()) } oCol:AddResource("DOCENTE") oCol:AddResource("ALUNNO") oCol:AddResource("CARTELLA") oCol:AddResource("GENITORE") oCol:AddResource("ESTERNO") oCol:bStrData := { || (oDCli)->ATTIVITA} oCol:cHeader := "Tipo" oCol:bEditValue := { || (oDCli)->ATTIVITA } oCol:nDataStyle := oCol:DefStyle( AL_LEFT, .T.) oCol:bBmpData := { || (oDCli)->Attivita} oCol:nWidth :=40 oCol:= oApp():oGrid:AddCol() oCol:AddResource("sort1") oCol:AddResource("sort2") oCol:cHeader := "Grado" oCol:nHeadBmpNo := 2 oCol:nHeadBmpAlign := AL_RIGHT oCol:bLClickHeader :={ ||(Sel_Index(6,oDCli) , oApp():oTab:nOption:=6,oApp():oTab:refresh()) } oCol:AddResource("GRADO1") oCol:AddResource("GRADO2") oCol:AddResource("GRADO3") oCol:AddResource("GRADO4") oCol:AddResource("GRADO5") oCol:AddResource("GRADO6") oCol:AddResource("GRADO7") oCol:AddResource("GRADO8") oCol:AddResource("GRADO0") oCol:bStrData := { || (oDCli)->GRADO} oCol:bBmpData := { || (oDCli)->GRADO} oCol:nWidth :=40 ....... Stat FUNC Sel_Index(n,cdbf) // 1 3 4 6 11 7 8 (cdbf)->(OrdSetFocus(n)) if n = 1 oApp():oGrid:aCols[1]:nHeadBmpNo := 1 oApp():oGrid:aCols[3]:nHeadBmpNo := 2 oApp():oGrid:aCols[4]:nHeadBmpNo := 2 oApp():oGrid:aCols[6]:nHeadBmpNo := 2 oApp():oGrid:aCols[11]:nHeadBmpNo := 2 oApp():oGrid:aCols[8]:nHeadBmpNo := 2 oApp():oGrid:aCols[7]:nHeadBmpNo := 2 elseif n = 2 oApp():oGrid:aCols[1]:nHeadBmpNo := 2 oApp():oGrid:aCols[3]:nHeadBmpNo := 1 oApp():oGrid:aCols[4]:nHeadBmpNo := 2 oApp():oGrid:aCols[6]:nHeadBmpNo := 2 oApp():oGrid:aCols[11]:nHeadBmpNo := 2 oApp():oGrid:aCols[8]:nHeadBmpNo := 2 oApp():oGrid:aCols[7]:nHeadBmpNo := 2 elseif n = 3 oApp():oGrid:aCols[1]:nHeadBmpNo := 2 oApp():oGrid:aCols[3]:nHeadBmpNo := 2 oApp():oGrid:aCols[4]:nHeadBmpNo := 1 oApp():oGrid:aCols[6]:nHeadBmpNo := 2 oApp():oGrid:aCols[11]:nHeadBmpNo := 2 oApp():oGrid:aCols[8]:nHeadBmpNo := 2 oApp():oGrid:aCols[7]:nHeadBmpNo := 2 elseif n = 4 oApp():oGrid:aCols[1]:nHeadBmpNo := 2 oApp():oGrid:aCols[3]:nHeadBmpNo := 2 oApp():oGrid:aCols[4]:nHeadBmpNo := 2 oApp():oGrid:aCols[6]:nHeadBmpNo := 2 oApp():oGrid:aCols[11]:nHeadBmpNo :=1 oApp():oGrid:aCols[8]:nHeadBmpNo := 2 oApp():oGrid:aCols[7]:nHeadBmpNo := 2 elseif n = 5 oApp():oGrid:aCols[1]:nHeadBmpNo := 2 oApp():oGrid:aCols[3]:nHeadBmpNo := 2 oApp():oGrid:aCols[4]:nHeadBmpNo := 2 oApp():oGrid:aCols[6]:nHeadBmpNo := 1 oApp():oGrid:aCols[11]:nHeadBmpNo := 2 oApp():oGrid:aCols[8]:nHeadBmpNo := 2 oApp():oGrid:aCols[7]:nHeadBmpNo := 2 elseif n = 6 oApp():oGrid:aCols[1]:nHeadBmpNo := 2 oApp():oGrid:aCols[3]:nHeadBmpNo := 2 oApp():oGrid:aCols[4]:nHeadBmpNo := 2 oApp():oGrid:aCols[6]:nHeadBmpNo := 2 oApp():oGrid:aCols[11]:nHeadBmpNo := 2 oApp():oGrid:aCols[8]:nHeadBmpNo := 1 oApp():oGrid:aCols[7]:nHeadBmpNo := 2 elseif n = 7 oApp():oGrid:aCols[1]:nHeadBmpNo := 2 oApp():oGrid:aCols[3]:nHeadBmpNo := 2 oApp():oGrid:aCols[4]:nHeadBmpNo := 2 oApp():oGrid:aCols[6]:nHeadBmpNo := 2 oApp():oGrid:aCols[11]:nHeadBmpNo := 2 oApp():oGrid:aCols[8]:nHeadBmpNo := 2 oApp():oGrid:aCols[7]:nHeadBmpNo := 1 //aggiungere per tipo endif (cdbf)->(DBGoTop()) oApp():oGrid:Refresh() oApp():oGrid:SetFocus() RETURN (NIL)
show image !
My friends what work images: Como trabalhar com imagens assim: <!-- m --><a class="postlink" href="http://img405.imageshack.us/img405/1643/restaurantenw4.jpg">http://img405.imageshack.us/img405/1643 ... ntenw4.jpg</a><!-- m -->
show image !
Aoki, If you want the bitmaps to cover all the area, then use TBitmap controls
show line number in memo edit
hi, i need show line and columm with an memoedit, i already make this in format get, but in memo normal i dont know, someone can help me?
show line number in memo edit
[quote="Nop":1mkq5jby]hi, i need show line and columm with an memoedit, i already make this in format get, but in memo normal i dont know, someone can help me?[/quote:1mkq5jby] Try [code:1mkq5jby]oGet&#58;GetRow&#40;&#41; oGet&#58;GetCol&#40;&#41;[/code:1mkq5jby] EMG
show line number in memo edit
Enrico, thanks, in format use i use: oFGet:bLocate := {| nRow, nCol | oMsgItem:SetText( "Lin: " + Str( nRow, 4 ) + " " + "Col: " + Str( nCol, 4 ) ) } this is can adapted to memo get? thanks
show line number in memo edit
[quote="Nop":3bds9fbq]Enrico, thanks, in format use i use: oFGet:bLocate := {| nRow, nCol | oMsgItem:SetText( "Lin: " + Str( nRow, 4 ) + " " + "Col: " + Str( nCol, 4 ) ) } this is can adapted to memo get? thanks[/quote:3bds9fbq] What is locate event? EMG
show line number in memo edit
i dont know, i see in a sample of format get, i need an way to show line , and columm when user movimente the cursor in memo. like an notepad. thanks again
show line number in memo edit
or maybe, use richedit in memofields, this is possible? i need like an notepad im memo files, showing the line and columm of cursor. thanks
show line number in memo edit
This is a sample but it is not working properly. Antonio? [code:3gn31o09]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg LOCAL oGet, cVar &#58;= "This is a test" LOCAL oRow, oCol DEFINE DIALOG oDlg; SIZE 400, 400 @ 0, 0 GET oGet VAR cVar MEMO; SIZE 100, 100 oGet&#58;bKeyDown = &#123; || ShowRowPos&#40; oGet, oRow, oCol &#41; &#125; @ 10, 0 SAY oRow PROMPT "nRow = " + LTrim&#40; Str&#40; oGet&#58;GetRow&#40;&#41; &#41; &#41; @ 11, 0 SAY oCol PROMPT "nCol = " + LTrim&#40; Str&#40; oGet&#58;GetCol&#40;&#41; &#41; &#41; oDlg&#58;bStart = &#123; || oGet&#58;SetPos&#40; 0 &#41; &#125; ACTIVATE DIALOG oDlg; CENTER RETURN NIL STATIC FUNCTION SHOWROWPOS&#40; oGet, oRow, oCol &#41; oRow&#58;SetText&#40; "nRow = " + LTrim&#40; Str&#40; oGet&#58;GetRow&#40;&#41; &#41; &#41; &#41; oCol&#58;SetText&#40; "nCol = " + LTrim&#40; Str&#40; oGet&#58;GetCol&#40;&#41; &#41; &#41; &#41; RETURN NIL[/code:3gn31o09] EMG
show line number in memo edit
Enrico, this is my problem... dont work...
show line number in memo edit
[quote="Nop":814otftl]Enrico, this is my problem... dont work...[/quote:814otftl] Did you try my sample? It works... almost. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> EMG
show only some records on Xbrowse ( nRecords year)
I made a small test to try I wish show only nrecord and only the year = nyear selected by user [code=fw:82104gr5]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />   RddSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />   SetHandleCount<span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />   SET DATE FORMAT <span style="color: #ff0000;">"dd-mm-yyyy"</span><br />   SET DELETED     <span style="color: #0000ff;">ON</span><br />   SET CENTURY     <span style="color: #0000ff;">ON</span><br />   SET EPOCH <span style="color: #0000ff;">TO</span>    <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span> date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">20</span><br />   SET MULTIPLE    OFF<br /><br /> <span style="color: #B900B9;">//  HB_LangSelect("IT")</span><br /><br /> Test_array<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Test_array<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">local</span> aDatalotto<br /><br /> <span style="color: #00C800;">local</span> nAnno   :=<span style="color: #ff0000;">"1871"</span><br /> loca nType    := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">local</span> nRecords:= <span style="color: #000000;">5</span><br /><br /> aDatalotto := Create_Array<span style="color: #000000;">&#40;</span>nRecords,nAnno,ntype<span style="color: #000000;">&#41;</span><br /><br />   Xbrowser aDatalotto<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> Create_Array<span style="color: #000000;">&#40;</span>nCount,nyear,nType<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oFont, oBrw, oGet1, oGet2, oDbf<br />   <span style="color: #00C800;">local</span> nInit,nEnd,bFor<br />   <span style="color: #00C800;">local</span> aTemp  := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> aNew<br /><br />   <span style="color: #00C800;">DEFAULT</span>  nCount := <span style="color: #000000;">10</span>  ,;<br />            nType:=<span style="color: #000000;">1</span> <span style="color: #B900B9;">//normal</span><br /><br /><br />    oDbf  := TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"LOTTO"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, .t. <span style="color: #000000;">&#41;</span><br /><br /><br />    <span style="color: #B900B9;">// select only n records</span><br />   <span style="color: #00C800;">IF</span> nCount > <span style="color: #000000;">0</span><br />       nInit:=oDbf:<span style="color: #000000;">lastrec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>-nCount<br />       nEnd:= oDbf:<span style="color: #000000;">lastrec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />      oDbf:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span> <||<br />                SET FILTER <span style="color: #0000ff;">TO</span>   <span style="color: #000000;">&#40;</span>  nInit <=  oDbf:<span style="color: #000000;">RECNO</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .AND. ;<br />                                    nEnd >=  oDbf:<span style="color: #000000;">RECNO</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>    <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />            > <span style="color: #000000;">&#41;</span><br /><br />   oDbf:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oDbf:<span style="color: #000000;">FW_DbfToArray</span><span style="color: #000000;">&#40;</span> , , , , , , aTemp <span style="color: #000000;">&#41;</span><br />   oDbf:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   xbrowser atemp    <span style="color: #B900B9;">// show 6 records why ??</span><br /><br /><br />   <span style="color: #B900B9;">// for condition year</span><br />   aNew     := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   AEval<span style="color: #000000;">&#40;</span> aTemp, <span style="color: #000000;">&#123;</span> |a| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span>a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> = val<span style="color: #000000;">&#40;</span>nYear<span style="color: #000000;">&#41;</span> , AAdd<span style="color: #000000;">&#40;</span> aNew, a <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />  * FW_DbfToArray<span style="color: #000000;">&#40;</span> , , , , , , aNew<span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br />  <span style="color: #00C800;">return</span>  aNew<br /><br /><br /><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:82104gr5] the first problem it show the 5 record + 1 I not understood why then for the year not run ok [b:82104gr5]for a sample[/b:82104gr5] if the user want show year= 1991 and the last 100 records not run ok