messages
listlengths
1
1
topic
stringlengths
2
60
[ { "date": "2010-02-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok, thank you.\n\nEMG", "time": "23:55", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr EMG\n\n>>\nOne more problem. How can I get transparent controls (ie. the SAY in the following sample) and not transparent image control at the same time?\n>>\n\nPlease try this modified code:\n[quote:164vnqec]#include \"Fivewin.ch\"\n\nFUNCTION MAIN()\n\n LOCAL oDlg, oBrush\n LOCAL cPath := 'c:\\fwh\\bitmaps\\' // change to your path\n\n DEFINE BRUSH oBrush\n DEFINE DIALOG oDlg SIZE 240,200 PIXEL BRUSH oBrush TRANSPARENT\n\n @ 10, 10 SAY 'Say on Transparent Dialog' SIZE 100,10 PIXEL OF oDlg\n\n @ 25, 25 IMAGE FILE cPath + \"select.bmp\" SIZE 20,20 PIXEL NOBORDER ADJUST\n\n @ 50, 25 IMAGE FILE cPath + \"AlphaBmp\\ichat.bmp\" SIZE 50,50 PIXEL NOBORDER ADJUST\n\n ACTIVATE DIALOG oDlg;\n ON INIT GRADIENTBRUSH( oDlg, { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } } );\n CENTER\n\n RELEASE BRUSH oBrush\n RETURN NIL\n[/quote:164vnqec]\nfunction GradientBrush will be the same as in the code posted by me already.\n\nResult:\n[url=http://img51.imageshack.us/my.php?image=grad2o.jpg:164vnqec][img:164vnqec]http://img51.imageshack.us/img51/6458/grad2o.jpg[/img:164vnqec][/url:164vnqec]", "time": "01:05", "topic": "A problem with GradientBrush()", "username": "nageswaragunupudi" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nPlease try this example which provides a good understanding about how brushes reuse works.\n\nThe problem with your examples is that you were modifying a brush that was already in use by the previous dialog. The solution is to end() its use and create a new one, so we don't interfere with the original one.\n\n[code=fw:sx8hmhcp]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><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 /><br />    <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />    <span style=\"color: #00C800;\">LOCAL</span> lVar := .F.<br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />           TRANSPARENT<br /><br />    @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />           <span style=\"color: #0000ff;\">ACTION</span> TEST<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />    @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">CHECKBOX</span> lVar<br /><br />    <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />             <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />             <span style=\"color: #0000ff;\">CENTER</span><br /><br />    oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />    <br />    <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">nCount</span> <span style=\"color: #000000;\">&#41;</span>         <br />    <br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> TEST<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />    <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />           TRANSPARENT<br /><br />    <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />             <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />             <span style=\"color: #0000ff;\">CENTER</span><br /><br />    oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />             <br />    <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">nCount</span> <span style=\"color: #000000;\">&#41;</span>         <br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />    <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld<br /><br />    hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />    GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />    oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />    oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />    AEval<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | o | o:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br />    DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />    oDlg:<span style=\"color: #000000;\">ReleaseDC</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 /> </div>[/code:sx8hmhcp]", "time": "01:22", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "In this example, lets asume that we want to use the same gradient colors for all our dialogs, so we can create just one brush and reuse it in all dialogs:\n\n[code=fw:152s7bot]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> lVar := .F.<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> TEST<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">CHECKBOX</span> lVar<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">nCount</span> <span style=\"color: #000000;\">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> TEST<span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> oBrush:<span style=\"color: #000000;\">nCount</span> <span style=\"color: #000000;\">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; <br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">nCount</span> <span style=\"color: #000000;\">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; <br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld<br /><br />&nbsp; &nbsp; hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; AEval<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | o | o:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">ReleaseDC</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 />&nbsp;</div>[/code:152s7bot]", "time": "01:32", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Antonio Linares\":yokz9bqq][code=fw:yokz9bqq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:yokz9bqq][/quote:yokz9bqq]\n\nIf I understand correctly, SetBrush() method already ends the previous brush, if assigned:\n\n[code=fw:yokz9bqq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">METHOD</span> SetBrush<span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">INLINE</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oBrush</span> != <span style=\"color: #00C800;\">nil</span>, ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,<span style=\"color: #000000;\">&#41;</span>,;</div>[/code:yokz9bqq]\n\nEMG", "time": "08:47", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Antonio Linares\":3fkes72q][code=fw:3fkes72q]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">nCount</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:3fkes72q][/quote:3fkes72q]\n\nWhy we need to explicitly release the brush? The dialog already release it on close. But if this is true then I don't understand why the message shows 1 if I comment out the first line... ?\n\nEMG", "time": "08:53", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nWe need to explicity release it because we have created a new brush.\n\nIt is not the original brush that was created by FWH. We have created a new one so we have to End() it. Keep in mind that End()s simply decrease the use counter and if it reaches zero, then it is finally destroyed calling DeleteObject().\n\nThis way we can share the same brush to be used from different controls, dialogs, windows.", "time": "11:53", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok. And what do you say about\n\n[code=fw:37g4cvg0]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:37g4cvg0]\n\nDo we need to release the brush here?\n\nEMG", "time": "12:30", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": ">>\noDlg:SetBrush( TBrush():New( ,,,, hBmp ) )\n>>\nTBrush():new() creates a brush object and sets the count to 1. oWnd/oDlg:SetBrush( oBrush ) increments count to 2. When the window/dialog is closed, the count of oBrush is decremented to 1. The program that first creates the brush is responsible to finally release the brush. In the above usage the brush is never released.\n\nTherefore it is not desirable to create brush inline while setting brush.\nWhat is to be done is :\nCreate brush ( count : 1 )\nsetbrush --> count 2\nclose window --> count 1\nbrush:end --> count 0 and released\n\nExamining the code for SetBrush makes it clear:\n[code=fw:2j6bc6nr]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp; <span style=\"color: #00C800;\">METHOD</span> SetBrush<span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">INLINE</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oBrush</span> != <span style=\"color: #00C800;\">nil</span>, ::<span style=\"color: #000000;\">oBrush</span>:<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">oBrush</span> := oBrush,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oBrush:<span style=\"color: #000000;\">nCount</span> == <span style=\"color: #00C800;\">nil</span>, oBrush:<span style=\"color: #000000;\">nCount</span> := <span style=\"color: #000000;\">1</span>, oBrush:<span style=\"color: #000000;\">nCount</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; ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:2j6bc6nr]", "time": "12:40", "topic": "A problem with GradientBrush()", "username": "nageswaragunupudi" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok, thank you. Maybe it's slightly unexpected that SetBrush() increments the brush counter, isn't it?\n\nEMG", "time": "12:48", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nMethod SetBrush() has to increase the counter. Thats its main utility <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nWe need to increase it when it is assigned to a new object, that will use it, and it will be automatically decreased from Method Destroy() when the container object is destroyed. \n\nIts the same technique that Windows uses internally with LoadLibrary() and FreeLibrary(). It uses counters, to know how many \"users\" a library has, and only when there is just one which calls FreeLibrary() again, then the library will be really freed.", "time": "13:05", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": ">>\nOk, thank you. Maybe it's slightly unexpected that SetBrush() increments the brush counter, isn't it?\n>>\n\nThis is Mr. Antonio's well thought of ingenious way of reusing resources like fonts, brushes, etc. Once we understand the architecture, we know what to do.\n \nSimple rule we are asked to remember is that \n(1) we create font / brush \n(2) use them anywhere in any number of windows and / or inherited classes and finally \n(3) release the fonts/brushes we created \"after\" closing all windows/inherited classes.", "time": "13:06", "topic": "A problem with GradientBrush()", "username": "nageswaragunupudi" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Dear Rao,\n\nWe learned this technique from Windows itself. It does it the same way <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "13:08", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Maybe it's a matter of naming. One doesn't expect that a method called SetBrush() creates a brush but merely assigns an existing one. So, why does it have to increase the brush counter as if it's creating one?\n\nEMG", "time": "13:31", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nThe counter is not to count the created brushes. The counter counts the number of users <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nWhen you assign a brush to an object, the number of users of the brush increases.", "time": "14:31", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr Antonio\n\nLet me put Mr. Enrico's question in a different way.\n\nIf the programmer creates a brush/font and uses it in as many windows ( and derivatives ) as he wants and releases the brush/font after all such windows are closed by him, there is no harm even if the FWH library does not keep count of the number of users of the resource. Application still works fine. Only thing is the user should not release the resource while it is still being used by a window ( or derivative ).\n\nWhats wrong with it?\n\nI do agree that the present system of incrementing and decrementing the number of windows using the resource has some additional benefits.\n\nFor example:\nCREATE BRUSH oBrush FILE cFile // nCount is 1\nCREATE WINDOW oWnd BRUSH oBrush // nCount is 2\nRELEASE BRUSH oBrush // nCount is 1 and so hBrush is not destroyed\nACTIVATE WINDOW ownd\n// here nCount becomes zero and the hBrush is released\nreturn nil\nEven this code works well with the present implementation.", "time": "14:58", "topic": "A problem with GradientBrush()", "username": "nageswaragunupudi" } ]
A problem with GradientBrush()
[ { "date": "2010-02-02", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Antonio Linares\":3gas9qqu]Enrico,\n\nThe counter is not to count the created brushes. The counter counts the number of users <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nWhen you assign a brush to an object, the number of users of the brush increases.[/quote:3gas9qqu]\n\nOk, it is the well known \"reference counting\" technique. But this still not explains why we have to explicitly release the old brush:\n\n[code=fw:3gas9qqu]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oDlg:<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:3gas9qqu]\n\nSetBrush() method already releases the old brush and increments the counter of the new brush. Or am I still missing something?\n\nEMG", "time": "15:27", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nYou are right, Method SetBrush() already End()s (and decreases) the previous used brush counter, so there is no need to call oBrush:End() as I have done in my examle <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "11:10", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok, please review this revised version:\n\n[code=fw:3em5yudx]<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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> lVar := .F.<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> TEST<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">CHECKBOX</span> lVar<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld, oBrush<br /><br />&nbsp; &nbsp; hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oBrush = TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; AEval<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | o | o:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</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;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />&nbsp; &nbsp; SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">ReleaseDC</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></div>[/code:3em5yudx]\n\nEMG", "time": "11:26", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nIt seems as the source code for function Test() is missing in your example", "time": "11:31", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok, this is even better:\n\n\n[code=fw:3bg9gi9a]<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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> lVar := .F.<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> TEST<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">CHECKBOX</span> lVar<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><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> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld, oBrush<br /><br />&nbsp; &nbsp; hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oBrush = TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; AEVAL<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | oCtl | <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oCtl:<span style=\"color: #000000;\">lTransparent</span>, oCtl:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <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 /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />&nbsp; &nbsp; SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">ReleaseDC</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></div>[/code:3bg9gi9a]\n\nEMG", "time": "11:41", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Now the image can be set to not-transparent:\n\n[code=fw:ugm9wee6]<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;\">\"Image.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 /><br />    <span style=\"color: #00C800;\">LOCAL</span> oDlg, oImg<br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />           TRANSPARENT<br /><br />    @ <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #0000ff;\">SAY</span> <span style=\"color: #ff0000;\">\"This is a test\"</span><br /><br />    @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">IMAGE</span> oImg;<br />           <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">50</span>, <span style=\"color: #000000;\">50</span>;<br />           FILE <span style=\"color: #ff0000;\">\"e:<span style=\"color: #000000;\">\\f</span>wharbour<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\s</span>elect.bmp\"</span>;<br />           NOBORDER <span style=\"color: #0000ff;\">ADJUST</span><br /><br />    <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />             <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">&#40;</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>,;<br />                       oImg:<span style=\"color: #000000;\">lTransparent</span> := .F. <span style=\"color: #000000;\">&#41;</span>;<br />             <span style=\"color: #0000ff;\">CENTER</span><br /><br />    <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />    <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld, oBrush<br /><br />    hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />    GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />    oBrush = TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />    oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />    AEVAL<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | oCtl | <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oCtl:<span style=\"color: #000000;\">lTransparent</span>, oCtl:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <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 /><br />    <span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />    SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br />    DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />    oDlg:<span style=\"color: #000000;\">ReleaseDC</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></div>[/code:ugm9wee6]\n\nEMG", "time": "11:48", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "I don't understand. Please explain what your generalization is suppose to do.\n\nEMG", "time": "12:10", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "There is a problem in the bEraseBkGnd of TSay. The following sample doesn't show a colored SAY if the theme is activated:\n\n[code=fw:22zqgzva]<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;\">\"Image.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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg, oSay<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> , CLR_HGREEN <span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSay:<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 />&nbsp; &nbsp; @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"This is a test\"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">COLOR</span> <span style=\"color: #00C800;\">NIL</span>, CLR_HRED<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&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> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style=\"color: #000000;\">lTransparent</span> := .F.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> , CLR_HRED <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld, oBrush<br /><br />&nbsp; &nbsp; hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oBrush = TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; AEVAL<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | oCtl | <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oCtl:<span style=\"color: #000000;\">lTransparent</span>, oCtl:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <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 /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />&nbsp; &nbsp; SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">ReleaseDC</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></div>[/code:22zqgzva]\n\nEMG", "time": "12:19", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote:2g2uysit] AEVAL( oDlg:aControls, { | oCtl | If( oCtl:lTransparent, oCtl:SetBrush( oDlg:oBrush ), ) } )\n[/quote:2g2uysit]\n\nCode given below is more generic\n[code=fw:2g2uysit]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">aControls</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'A'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oWnd:<span style=\"color: #000000;\">IsKindOf</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'TDIALOG'</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> IsAppThemed<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> |o| <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> $ <span style=\"color: #ff0000;\">'TCHECKBOX'</span>, o:<span style=\"color: #000000;\">oBrush</span> := <span style=\"color: #00C800;\">Self</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> |o| <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> $ <span style=\"color: #ff0000;\">'TCHECKBOX,TRADIO'</span>, o:<span style=\"color: #000000;\">oBrush</span> := <span style=\"color: #00C800;\">Self</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elseif ownd:<span style=\"color: #000000;\">ClassName</span> $ <span style=\"color: #ff0000;\">'TWINDOW,TPANEL,TMDICHILD'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> |o| <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> $ <span style=\"color: #ff0000;\">'TCHECKBOX,TRADIO,TSAY'</span>, o:<span style=\"color: #000000;\">oBrush</span> := <span style=\"color: #00C800;\">Self</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp;</div>[/code:2g2uysit]", "time": "12:04", "topic": "A problem with GradientBrush()", "username": "nageswaragunupudi" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "This is a possible fix:\n\n[code=fw:37utvfn2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">METHOD</span> EraseBkGnd<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TSay <br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">lTransparent</span> := .f. <br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">lTransparent</span> <br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">1</span> <br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span> <br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">EraseBkGnd</span><span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span></div>[/code:37utvfn2] \n\nAntonio, please review.\n\nEMG", "time": "12:23", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "But that not fixes the initial color problem (ie. the COLOR clause doesn't work with themes activated).\n\nEMG", "time": "12:30", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nAre those examples working fine for you ? Here they are working fine on both Windows 7 and XP.", "time": "12:44", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Please try this sample. The SAY doesn't get the background color. When I click on the button it gets the background color (using XP):\n\n[code=fw:243altm3]<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 /><br />    <span style=\"color: #00C800;\">LOCAL</span> oDlg, oSay<br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />           TRANSPARENT<br /><br />    @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />           <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_HGREEN, CLR_HRED <span style=\"color: #000000;\">&#41;</span>,;<br />                    oSay:<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 />    @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"This is a test\"</span>;<br />           <span style=\"color: #0000ff;\">COLOR</span> CLR_HGREEN, CLR_HRED<br /><br />    <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />             <span style=\"color: #0000ff;\">CENTER</span><br /><br />    <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span></div>[/code:243altm3]\n\nEMG", "time": "13:13", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nIn my opinion it is a right behavior, I explain you why <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nclause TRANSPARENT on the dialog means that we want to use the \"background\" of the dialog, thats why the dialog overrides the SAY background color (the SAY brush is replaced). Later on, if you want to change it, then you can do it. But before, FWH changes all the backgrounds as the clause TRANSPARENT is instructing.\n\nWe could change this behavior if we all decide to make it work on a different way <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "13:54", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": ">In my opinion it is a right behavior\n\nI agree.\n\nRegards,\nJames", "time": "17:24", "topic": "A problem with GradientBrush()", "username": "James Bott" } ]
A problem with GradientBrush()
[ { "date": "2010-02-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Ok, I given up to use colored labels.\n\nEMG", "time": "22:04", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nWell I would also like to see folders with colored tabs.\n\n[quote:2wfrs88m]clause TRANSPARENT on the dialog means that we want to use the \"background\" of the dialog, thats why the dialog overrides the SAY background color (the SAY brush is replaced).[/quote:2wfrs88m]\n\nActually, I am not sure this is the best way. I have been saying for quite some time that I thought all contols should be transparent. That way they will always show the color of their parent (window, dialog, panel, folder, toolbar, or whatever).\n\nSetting the dialog to transparent seems backward. If the dialog was transparent then one would expect whatever is behind the dialog to show through--which is not what we want. I am guessing that what it does mean is that all the controls on the dialog are made transparent by the dialog. But, if the controls were all transparent by default, then this wouldn't be needed. Perhaps I am missing something.\n\nRegards,\nJames", "time": "00:29", "topic": "A problem with GradientBrush()", "username": "James Bott" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\n[quote:1k07oo54]But that not fixes the initial color problem (ie. the COLOR clause doesn't work with themes activated).[/quote:1k07oo54]\n\nI'm not sure how this is supposed to work. Are themes supposed to override all defined colors in the application, or only certain colors? \n\nIt does seem that it would be useful to be able to override certain colors when using themes. It does also seem that it could get complicated since you may want some colors defined when not using themes and defined by the theme when using themes. Or, you may want some colors always defined with or without themes. I guess you would need an isThemed() function to use when defining colors.\n\nRegards,\nJames", "time": "00:56", "topic": "A problem with GradientBrush()", "username": "James Bott" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nAs far as I understand you, it seems as you want to have dialogs that use the clause TRANSPARENT but have SAYs with colored backgrounds (instead of using \"transparent\" ones).\n\nIs that what you mean ? thanks\n\nI guess we can easily implement it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "01:21", "topic": "A problem with GradientBrush()", "username": "Antonio Linares" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Antonio Linares\":2i3ldziu]Enrico,\n\nAs far as I understand you, it seems as you want to have dialogs that use the clause TRANSPARENT but have SAYs with colored backgrounds (instead of using \"transparent\" ones).\n\nIs that what you mean ? thanks\n\nI guess we can easily implement it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:2i3ldziu]\n\nExactly. Actually I need to make non-transparent only one or two controls in a dialog and the rest all transparent. That's why I wrote\n\n[code=fw:2i3ldziu]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">AEVAL<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | oCtl | <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oCtl:<span style=\"color: #000000;\">lTransparent</span>, oCtl:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:2i3ldziu]\n\nthat seems to work for TImage but not for TSay.\n\nEMG", "time": "09:10", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "The following sample seems to work at first but if you cover the dialog and then uncover it you will see that the colored background of the SAY is gone:\n\n[code=fw:25m9d214]<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 /><br />    <span style=\"color: #00C800;\">LOCAL</span> oDlg, oSay<br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />           TRANSPARENT<br /><br />    @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />           <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_HGREEN, CLR_HRED <span style=\"color: #000000;\">&#41;</span>,;<br />                    oSay:<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 />    @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"This is a test\"</span><br /><br />&nbsp; &nbsp; oSay:<span style=\"color: #000000;\">lTransparent</span> = .F.<br /><br />    oDlg:<span style=\"color: #000000;\">bStart</span> = <span style=\"color: #000000;\">&#123;</span> || oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_HRED, CLR_HGREEN <span style=\"color: #000000;\">&#41;</span>, oSay:<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: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />             <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />             <span style=\"color: #0000ff;\">CENTER</span><br /><br />    <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />    <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld, oBrush<br /><br />    hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />    GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />    oBrush = TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />    oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />    AEVAL<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | oCtl | <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oCtl:<span style=\"color: #000000;\">lTransparent</span>, oCtl:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <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 /><br />    <span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />    SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br />    DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />    oDlg:<span style=\"color: #000000;\">ReleaseDC</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></div>[/code:25m9d214]\n\nEMG", "time": "22:01", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "[code=fw:352u0or3]<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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg, oSay<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br /><span style=\"color: #B900B9;\">// &nbsp; &nbsp;@ 1, 1 BUTTON \"Test\";</span><br /><span style=\"color: #B900B9;\">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ACTION ( oSay:SetColor( CLR_HGREEN, CLR_HRED ),;</span><br /><span style=\"color: #B900B9;\">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:Refresh() )</span><br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Test\"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">bPainted</span>:=<span style=\"color: #000000;\">&#123;</span>|| oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_HGREEN, CLR_HRED <span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSay:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span>, oDlg:<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 />&nbsp; &nbsp; @ <span style=\"color: #000000;\">3</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">SAY</span> oSay <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"This is a test\"</span><br /><br />&nbsp; &nbsp; oSay:<span style=\"color: #000000;\">lTransparent</span> = .F.<br /><br />&nbsp; &nbsp; <span style=\"color: #B900B9;\">//oDlg:bStart = { || oSay:SetColor( CLR_HRED, CLR_HGREEN ), oSay:Refresh() }</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">bPainted</span> = <span style=\"color: #000000;\">&#123;</span> || oSay:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_HRED, CLR_HGREEN <span style=\"color: #000000;\">&#41;</span>, oSay:<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 />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, <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;\">216</span>, <span style=\"color: #000000;\">230</span>, <span style=\"color: #000000;\">238</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">103</span>, <span style=\"color: #000000;\">154</span>, <span style=\"color: #000000;\">194</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>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRADIENTBRUSH<span style=\"color: #000000;\">&#40;</span> oDlg, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> hDC, hBmp, hBmpOld, oBrush<br /><br />&nbsp; &nbsp; hDC = CREATECOMPATIBLEDC<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmp = CREATECOMPATIBLEBITMAP<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">hDC</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, oDlg:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; hBmpOld = SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; GRADIENTFILL<span style=\"color: #000000;\">&#40;</span> hDC, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, oDlg:<span style=\"color: #000000;\">nHeight</span>, oDlg:<span style=\"color: #000000;\">nWidth</span>, aColors <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oBrush = TBrush<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> ,,,, hBmp <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; AEVAL<span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> | oCtl | <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oCtl:<span style=\"color: #000000;\">lTransparent</span>, oCtl:<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oDlg:<span style=\"color: #000000;\">oBrush</span> <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 /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />&nbsp; &nbsp; SELECTOBJECT<span style=\"color: #000000;\">&#40;</span> hDC, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; DELETEDC<span style=\"color: #000000;\">&#40;</span> hDC <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">ReleaseDC</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></div>[/code:352u0or3]", "time": "23:08", "topic": "A problem with GradientBrush()", "username": "James Bott" } ]
A problem with GradientBrush()
[ { "date": "2010-02-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you, James.\n\nEMG", "time": "23:14", "topic": "A problem with GradientBrush()", "username": "Enrico Maria Giordano" } ]
A problem with GradientBrush()
[ { "date": "2019-08-13", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed a SAY painting problem and needed the following adjustment :\n\n@ 26 * nFactor, 25 * nFactor SAY oDay PROMPT cDay OF oWnd FONT oFontDay PIXEL UPDATE\noDay:SetColor ( aVal[23], )\noDay:lTransparent := .T.\noDay:nLeft := ( oWnd:nWidth() - oDay:nWidth() ) / 2\n[color=#0000FF:1x288g4q]oDay:nHeight += 5[/color:1x288g4q] // [size=150:1x288g4q]y[/size:1x288g4q] display ( I think it will be the same with [size=150:1x288g4q]g[/size:1x288g4q] and [size=150:1x288g4q]j[/size:1x288g4q]\nIF aVal[26] = .T. // [size=150:1x288g4q]Italic[/size:1x288g4q]\n[color=#0000FF:1x288g4q]oDay:nWidth += 8[/color:1x288g4q] // width itallic-font\nENDIF\n\n[img:1x288g4q]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Fontsize10&#46;jpg[/img:1x288g4q]", "time": "15:08", "topic": "A problem with SAY and font- style and < size default >", "username": "ukoenig" } ]
A problem with SAY and font- style and < size default >
[ { "date": "2019-08-15", "forum": "FiveWin for Harbour/xHarbour", "text": "small sample?", "time": "14:08", "topic": "A problem with SAY and font- style and < size default >", "username": "karinha" } ]
A problem with SAY and font- style and < size default >
[ { "date": "2019-08-15", "forum": "FiveWin for Harbour/xHarbour", "text": "The same result creating a sample\n\n[size=150:e18orla0]the black titles and frames I got after the last Window 10 - update ( 2 days ago )[/size:e18orla0] <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> \nAll titles are black now word, exel ....\nmaybe possible to fix it <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \nI did a monitor-reset but no luck still the same\nThe black text changed to white now and the systembuttons are still painted black\n\n[img:e18orla0]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Testsay1&#46;jpg[/img:e18orla0]\n\n[b:e18orla0]the normal view before the windows-update ( see the difference ) [/b:e18orla0]\ntoday I got another update but no change\n\n[img:e18orla0]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Testsay2&#46;jpg[/img:e18orla0]\n\nFUNCTION MAIN()\nLOCAL oWnd, oTime, oDate, oDay\nLOCAL oFontTime, oFontDate, oFontDay\n\ncTime := SUBSTR( Time(), 1, 6) + \"00\"\ndDate := Date()\ncDay := cDow( Date() ) \n\nDEFINE FONT oTempTime NAME \"Alpine\" SIZE 0, -20\nDEFINE FONT oTempDay NAME \"Alpine\" SIZE 0, -30\nDEFINE FONT oTempDate NAME \"Alpine\" SIZE 0, -40\n\noFontTime := oTempTime:Modify( -30, .T., .T. )\noFontDay := oTempTime:Modify( -40, .T., .T. ) \noFontDate := oTempTime:Modify( -50, .T., .T. )\n\n// top, left TO height, width\nDEFINE WINDOW oWnd FROM 100, 100 TO 400, 400 PIXEL ;\nTITLE \"ALARM\" COLOR 0, 16777215\n\n@ 30, 30 SAY oTime PROMPT cTime OF oWnd FONT oFontTime PIXEL UPDATE\noTime:SetColor ( 255, )\noTime:lTransparent := .T.\n[color=#4000FF:e18orla0]oTime:nHeight += 5\noTime:nWidth += 5 // Italic[/color:e18orla0]\noTime:nLeft := ( oWnd:nWidth() - oTime:nWidth() ) / 2 - 5 // centered\n\n@ 80, 30 SAY oDay PROMPT cDay OF oWnd FONT oFontDay PIXEL UPDATE\noDay:SetColor ( 255, )\noDay:lTransparent := .T.\n[color=#0000FF:e18orla0]oDay:nHeight += 5\noDay:nWidth += 5[/color:e18orla0]\noDay:nLeft := ( oWnd:nWidth() - oDay:nWidth() ) / 2 - 5\n\n@ 140, 30 SAY oDate PROMPT dDate OF oWnd FONT oFontDate PIXEL UPDATE\noDate:SetColor ( 255, )\noDate:lTransparent := .T.\n[color=#4000FF:e18orla0]oDate:nHeight += 5\noDate:nWidth += 5[/color:e18orla0]\noDate:nLeft := ( oWnd:nWidth() - oDate:nWidth() ) / 2 - 5\nACTIVATE WINDOW oWnd\n\nRELEASE FONT oFontTime, oFontDay, oFontDate\n\nRETURN NIL\n\nThe same without \n\n[color=#FF0080:e18orla0]oFontTime := oTempTime:Modify( -30, .T., .T. )\noFontDay := oTempTime:Modify( -40, .T., .T. ) \noFontDate := oTempTime:Modify( -50, .T., .T. )[/color:e18orla0]\n\nusing\n\nDEFINE FONT oFontTime NAME \"Alpine\" SIZE 0, -30 ITALIC\nDEFINE FONT oFontDay NAME \"Alpine\" SIZE 0, -40 ITALIC\nDEFINE FONT oFontDate NAME \"Alpine\" SIZE 0, -50 ITALIC\n\n[color=#0000FF:e18orla0][b:e18orla0]:Modify( [/b:e18orla0] [/color:e18orla0]is needed to change fonts at runtime\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "16:45", "topic": "A problem with SAY and font- style and < size default >", "username": "ukoenig" } ]
A problem with SAY and font- style and < size default >
[ { "date": "2019-08-15", "forum": "FiveWin for Harbour/xHarbour", "text": "Uwe, looks perfect. I did not find any errors. I did not understand.\n\n[code=fw:2rzzazvc]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">STATIC</span> oWnd<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> oWnd, oTime, oDate, oDay<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> oFontTime, oFontDate, oFontDay, oTempTime, oTempDay, oTempDate<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> cTime, dDate, cDay<br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// SET CENTURY ON</span><br />&nbsp; &nbsp;SET DATE BRITISH<br />&nbsp; &nbsp;SET TIME FORMAT <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"HH:MM:SS\"</span><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// SET EPOCH TO YEAR( DATE() ) - 50</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// cTime := SUBSTR( Time(), 1, 6 ) + \"00\" &nbsp;//???</span><br /><br />&nbsp; &nbsp;cTime := Time<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;dDate := Date<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cDay := cDow<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><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oTempTime <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Alpine\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, - <span style=\"color: #000000;\">20</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oTempDay &nbsp;<span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Alpine\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, - <span style=\"color: #000000;\">30</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oTempDate <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Alpine\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, - <span style=\"color: #000000;\">40</span><br /><br />&nbsp; &nbsp;oFontTime := oTempTime:<span style=\"color: #000000;\">Modify</span><span style=\"color: #000000;\">&#40;</span> - <span style=\"color: #000000;\">30</span>, .T. , .T. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oFontDay &nbsp;:= oTempTime:<span style=\"color: #000000;\">Modify</span><span style=\"color: #000000;\">&#40;</span> - <span style=\"color: #000000;\">40</span>, .T. , .T. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oFontDate := oTempTime:<span style=\"color: #000000;\">Modify</span><span style=\"color: #000000;\">&#40;</span> - <span style=\"color: #000000;\">50</span>, .T. , .T. <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// top, left TO height, width</span><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;\">100</span>, <span style=\"color: #000000;\">100</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">400</span>, <span style=\"color: #000000;\">400</span> <span style=\"color: #0000ff;\">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"ALARM\"</span> <span style=\"color: #0000ff;\">COLOR</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">16777215</span><br /><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">30</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">SAY</span> oTime <span style=\"color: #0000ff;\">PROMPT</span> cTime <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">120</span>, <span style=\"color: #000000;\">40</span> <span style=\"color: #0000ff;\">FONT</span> oFontTime <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">UPDATE</span><br /><br />&nbsp; &nbsp;oTime:<span style=\"color: #000000;\">SetColor</span> <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oTime:<span style=\"color: #000000;\">lTransparent</span> := .T.<br />&nbsp; &nbsp;oTime:<span style=\"color: #000000;\">nHeight</span> += <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp;oTime:<span style=\"color: #000000;\">nWidth</span> += <span style=\"color: #000000;\">5</span> <span style=\"color: #B900B9;\">// Italic</span><br />&nbsp; &nbsp;oTime:<span style=\"color: #000000;\">nLeft</span> := <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - oTime:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span> - <span style=\"color: #000000;\">5</span> <span style=\"color: #B900B9;\">// centered</span><br /><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">80</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">SAY</span> oDay <span style=\"color: #0000ff;\">PROMPT</span> cDay <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">198</span>, <span style=\"color: #000000;\">50</span> <span style=\"color: #0000ff;\">FONT</span> oFontDay <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">UPDATE</span><br /><br />&nbsp; &nbsp;oDay:<span style=\"color: #000000;\">SetColor</span> <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oDay:<span style=\"color: #000000;\">lTransparent</span> := .T.<br />&nbsp; &nbsp;oDay:<span style=\"color: #000000;\">nHeight</span> += <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp;oDay:<span style=\"color: #000000;\">nWidth</span> += <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp;oDay:<span style=\"color: #000000;\">nLeft</span> := <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - oDay:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span> - <span style=\"color: #000000;\">5</span><br /><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">140</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">SAY</span> oDate <span style=\"color: #0000ff;\">PROMPT</span> dDate <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">198</span>, <span style=\"color: #000000;\">50</span> <span style=\"color: #0000ff;\">FONT</span> oFontDate <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">UPDATE</span> ;<br /><br /><br />&nbsp; &nbsp;oDate:<span style=\"color: #000000;\">SetColor</span> <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oDate:<span style=\"color: #000000;\">lTransparent</span> := .T.<br />&nbsp; &nbsp;oDate:<span style=\"color: #000000;\">nHeight</span> += <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp;oDate:<span style=\"color: #000000;\">nWidth</span> += <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp;oDate:<span style=\"color: #000000;\">nLeft</span> := <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - oDate:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span> - <span style=\"color: #000000;\">5</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> oFontTime, oFontDay, oFontDate<br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br />&nbsp;</div>[/code:2rzzazvc]\n\nRegards, saludos.", "time": "17:53", "topic": "A problem with SAY and font- style and < size default >", "username": "karinha" } ]
A problem with SAY and font- style and < size default >
[ { "date": "2019-08-15", "forum": "FiveWin for Harbour/xHarbour", "text": "Did You delete the marked lines for the width and height correction\nto make the problem visible ?\nYou will see the difference without these lines and value -5\n\n[color=#0000FF:26pcc2du]oTime:nHeight += 5\noTime:nWidth += 5 // Italic[/color:26pcc2du]\noTime:nLeft := ( oWnd:nWidth() - oTime:nWidth() ) / 2 [color=#0000FF:26pcc2du]- 5[/color:26pcc2du] // centered\n\n[color=#0000FF:26pcc2du]oDay:nHeight += 5\noDay:nWidth += 5[/color:26pcc2du]\noDay:nLeft := ( oWnd:nWidth() - oDay:nWidth() ) / 2 [color=#0000FF:26pcc2du]- 5[/color:26pcc2du]\n\n[color=#0000FF:26pcc2du]oDate:nHeight += 5\noDate:nWidth += 5[/color:26pcc2du]\noDate:nLeft := ( oWnd:nWidth() - oDate:nWidth() ) / 2 [color=#0000FF:26pcc2du]- 5[/color:26pcc2du]\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "17:57", "topic": "A problem with SAY and font- style and < size default >", "username": "ukoenig" } ]
A problem with SAY and font- style and < size default >
[ { "date": "2019-08-15", "forum": "FiveWin for Harbour/xHarbour", "text": "In Class TSAY I added\n\nLine 93\n [b:36kg1t5c]// DEFAULT nWidth := SAY_CHARPIX_W * Len( ::cCaption ) - 4\n DEFAULT nWidth := GetTextWidth( 0, ::cCaption, If( oFont != nil, oFont:hFont,;\n If( oWnd:oFont != nil, oWnd:oFont:hFont,) ) ) [color=#0000FF:36kg1t5c] + 5[/color:36kg1t5c][/b:36kg1t5c]\n\nbecause NO textwidth and height is defined ( DEFAULT-values )\n\nshould be corrected for a undefined nHeight as well\n\nLine 72\nnHeight := If( oFont != nil, Abs( oFont:nHeight ), SAY_CHARPIX_H ) [color=#0000FF:36kg1t5c]+ 5[/color:36kg1t5c],;\n\nregards\nUwe", "time": "18:30", "topic": "A problem with SAY and font- style and < size default >", "username": "ukoenig" } ]
A problem with SAY and font- style and < size default >
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed a problem using tDatabase Copy() / Paste([color=#FF0000:q85bvmsz]aVals[/color:q85bvmsz])\nWihout selected fields, record 9 is copied to 10\n\n[img:q85bvmsz]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Network13&#46;jpg[/img:q85bvmsz]\n\nMETHOD Copy()\nMETHOD Paste( aVals )\n\nusing Paste() without aVals works\nadding aVals doesn't work <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> \n\n[code=fw:q85bvmsz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">FUNCTION</span> NET_COPY4 <span style=\"color: #000000;\">&#40;</span> nStart, nEnd, lFields <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Local</span> lReturn := .T., aVals := <span style=\"color: #000000;\">&#123;</span> oCust:<span style=\"color: #000000;\">Last</span>, oCust:<span style=\"color: #000000;\">First</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #00C800;\">IF</span> nStart = nEnd<br />    lReturn := .F. <br />    MsgAlert<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"nStart = nEnd\"</span> + CRLF + ;<br />    <span style=\"color: #ff0000;\">\"Not possible, to copy Record + ALLTRIM(STR(nRecord)) !\"</span>, <span style=\"color: #ff0000;\">\"ERROR\"</span><span style=\"color: #000000;\">&#41;</span><br />    <span style=\"color: #00C800;\">RETURN</span> lReturn<br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />oCust:<span style=\"color: #000000;\">Copy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// copy fields of selected record</span><br /><br /><span style=\"color: #00C800;\">IF</span> nEnd > <span style=\"color: #000000;\">0</span> <span style=\"color: #B900B9;\">// no append</span><br />    oCust:<span style=\"color: #000000;\">KeyGoTo</span><span style=\"color: #000000;\">&#40;</span> nEnd <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// go to defined record</span><br /><span style=\"color: #00C800;\">ELSE</span><br />    oCust:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />oCust:<span style=\"color: #000000;\">Lock</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">IF</span> lFields = .T. <span style=\"color: #B900B9;\">// using selected fields</span><br />    oCust:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span>aVals<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// doesn't work !</span><br /><span style=\"color: #00C800;\">ELSE</span><br />    oCust:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #B900B9;\">// works</span><br /><span style=\"color: #00C800;\">ENDIF</span><br />oCust:<span style=\"color: #000000;\">SAVE</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">Commit</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">UnLock</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> lReturn </div>[/code:q85bvmsz]\n\nmaybe something wrong with paste() <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "13:33", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "ukoenig" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "TDatabase is already Net Ready.\n\nThere is no need for NET_* functions for TDatabase. This is unnecessary and superfluous. \n\nYour code:\n[code=fw:2uoehws2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oCust:<span style=\"color: #000000;\">Lock</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">IF</span> lFields = .T. <span style=\"color: #B900B9;\">// using selected fields</span><br />&nbsp; &nbsp; oCust:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span>aVals<span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ELSE</span><br />&nbsp; &nbsp; oCust:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> &nbsp;<span style=\"color: #B900B9;\">// Paste( aVals )</span><br /><span style=\"color: #00C800;\">ENDIF</span><br />oCust:<span style=\"color: #000000;\">SAVE</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">Commit</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">UnLock</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:2uoehws2]\n\nWhere is the need to write the unnecessary code to Lock, Save and Unlock()?\nHow do you think FWH releases methods without inbuilt locking and unlocking?\n\nFWH methods are simple to use. It is simpler and safer to use the methods as they are provided. Kindly do not complicate them with such unnecessay superflous code.\n\nNow, about the methods Copy() and Paste()\n\n1) Copying all values from one record to another record:\n[code=fw:2uoehws2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />WITH OBJECT oDbf<br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Goto</span><span style=\"color: #000000;\">&#40;</span> nSrcRec <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Copy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> nDstRec <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />END<br />&nbsp;</div>[/code:2uoehws2]\n\n2) Copying all values of a record and appending:\n(a)\n[code=fw:2uoehws2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />WITH OBJECT oDbf<br />&nbsp; &nbsp;:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> nSrcRec <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Copy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Blank</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />END<br />&nbsp;</div>[/code:2uoehws2]\n(b)\n[code=fw:2uoehws2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />WITH OBJECT oDbf<br />&nbsp; &nbsp;:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> nSrcRec <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Copy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Append</span><span style=\"color: #000000;\">&#40;</span> :<span style=\"color: #000000;\">aCopy</span> <span style=\"color: #000000;\">&#41;</span><br />END<br />&nbsp;</div>[/code:2uoehws2]\n\n(c)\nCopying and pasting selected fields\n[code=fw:2uoehws2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />WITH OBJECT oDbf<br />&nbsp; &nbsp;:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> nSrcRec <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;aVals := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"FIRST\"</span>, :<span style=\"color: #000000;\">First</span> <span style=\"color: #000000;\">&#125;</span>, <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"LAST\"</span>, :<span style=\"color: #000000;\">Last</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> nDstRec <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span> aVals <span style=\"color: #000000;\">&#41;</span><br />END<br />&nbsp;</div>[/code:2uoehws2]\naVals can be a list of values of all fields\nOr a 2-dim array with fieldnames and values.", "time": "15:52", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "nageswaragunupudi" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr Rao,\n\nthank You very much for the detailed info\nI changed the function and it works fine now <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \nI think I can still optimize the other defined functions inside the sample as well.\nI'm trying to test most of the tDatabase methods\n\n[code=fw:3ic167ro]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">FUNCTION</span> NET_COPY4 <span style=\"color: #000000;\">&#40;</span> nStart, nEnd, lFields <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Local</span> lReturn := .T.<br /><span style=\"color: #00C800;\">Local</span> aVals := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #00C800;\">IF</span> nStart = nEnd<br />    lReturn := .F. <br />    MsgAlert<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"nStart = nEnd\"</span> + CRLF + ;<br />    <span style=\"color: #ff0000;\">\"Not possible, to copy Record + ALLTRIM(STR(nRecord)) !\"</span>, <span style=\"color: #ff0000;\">\"ERROR\"</span><span style=\"color: #000000;\">&#41;</span><br />    <span style=\"color: #00C800;\">RETURN</span> lReturn<br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />WITH OBJECT oCust<br />    aVals := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"FIRST\"</span>, :<span style=\"color: #000000;\">First</span> <span style=\"color: #000000;\">&#125;</span>, <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">\"LAST\"</span>, :<span style=\"color: #000000;\">Last</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br />    <span style=\"color: #B900B9;\">// :Goto( nSrcRec ) selected from xBrowse</span><br />    :<span style=\"color: #000000;\">Copy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// copy fields of selected record</span><br />    <span style=\"color: #00C800;\">IF</span> nEnd > <span style=\"color: #000000;\">0</span><br />        :<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> nEnd <span style=\"color: #000000;\">&#41;</span><br />    <span style=\"color: #00C800;\">ELSE</span><br />        oCust:<span style=\"color: #000000;\">Append</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;\">IF</span> lFields = .T.<br />        :<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span>aVals<span style=\"color: #000000;\">&#41;</span><br />    <span style=\"color: #00C800;\">ELSE</span><br />        :<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />    <span style=\"color: #00C800;\">ENDIF</span><br />END <br /> </div>[/code:3ic167ro]", "time": "16:22", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "ukoenig" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "We do not think TDatabase methods need external help for optimization.\nWe recommend using them directly as FWH provided.", "time": "16:28", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "nageswaragunupudi" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr. Rao,\n\nI dont' want to change or optimize anything.\nI only want to create some samples where I can have a look for the practical usage\nnot wasting time searching inside the class or forum to get detailed infos.\nThat is the only reason.\n\nI added Your swap - sample to the sample-dialog 3\n\n[img:gyryamr6]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Network14&#46;jpg[/img:gyryamr6]\n\nregards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "16:43", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "ukoenig" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "Do we have samples of xbrowse copy / paste ?\n\nIs there a setting that shows a menu on right click to do the copy / paste of a record ( like there is for text ) ?\n\nAre the values saved to the clipboard or are they lost when the xbrowse is closed. For example, if I open an xbrowse ( filtered ) and do a copy of a record, can I close it, then open the same file with a separate filter and do the paste ?", "time": "21:10", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "TimStone" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-01-31", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote:1qt3jdl7]\nDo we have samples of xbrowse copy / paste ?\n[/quote:1qt3jdl7]\nThis is not a feature of xbrowse. This is a feature of TDatabase.\n[quote:1qt3jdl7]\nIs there a setting that shows a menu on right click to do the copy / paste of a record ( like there is for text ) ?\n[/quote:1qt3jdl7]\nNo.\n[quote:1qt3jdl7]\nAre the values saved to the clipboard or are they lost when the xbrowse is closed. For example, if I open an xbrowse ( filtered ) and do a copy of a record, can I close it, then open the same file with a separate filter and do the paste ?\n[/quote:1qt3jdl7]\nThis is a feature of TDatabase.\nThe copied values are stored as data. oDbf:aCopy.\nThese values are available as long as the object is live.\n\nIt does not matter we close xbrowse and reopen in another xbrowse.\nWith TDatabase we can close and reopen the same dbf after some time.\nIn all cases the data aCopy is retained.\n[code=fw:1qt3jdl7]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oCust:<span style=\"color: #000000;\">SetFilter</span><span style=\"color: #000000;\">&#40;</span> ... <span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> x <span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">Copy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #B900B9;\">// Optionally we can even close and reopen the same dbf later</span><br />oCust:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #B900B9;\">// after some time</span><br />oCust:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #B900B9;\">//</span><br />oCust:<span style=\"color: #000000;\">SetFilter</span><span style=\"color: #000000;\">&#40;</span> ... <span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">GoTo</span><span style=\"color: #000000;\">&#40;</span> xx <span style=\"color: #000000;\">&#41;</span><br />oCust:<span style=\"color: #000000;\">Paste</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// works</span><br /> </div>[/code:1qt3jdl7]\n\nThe programmer has to develop his own user interface for the copy and paste operations.", "time": "21:28", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "nageswaragunupudi" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2019-02-01", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr. Tim\n\nThis thread is about Copy/Paste features of TDatabase.\n\nXBrowse has its own powerful Copy/Paste features using clibboard. Contents of clipboard remain till they are cleared even after closing the xbrowse. These features work not only across different browsers of any data, but also to copy and paste between external applications like Excel, etc.\n\nThese features were dicusssed in different threads already. But we will soon make a separate post with complete details.", "time": "22:15", "topic": "A problem with TDatabase using copy() / Past() ?", "username": "nageswaragunupudi" } ]
A problem with TDatabase using copy() / Past() ?
[ { "date": "2016-02-06", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed a problem with < ChooseColor() >\nrestoring the old color, doesn't seems to work\na BREAK returns always 0 ( black )\nAlso tested changing the color BEFORE the break but still black\nReturn NIL would be ok, because 0 is a color as well can be selected.\n\ntested as well with sample < LINES.prg >\n\n[color=#0040FF:360g6lqy][b:360g6lqy]STATIC PROCEDURE NewColor()\nLOCAL OldColor := nColor\nif ( nColor := ChooseColor() ) == -1 // NO result\n // MsgAlert( nColor ) = returns always 0 !!! \n nColor := OldColor\nendif[/b:360g6lqy][/color:360g6lqy]\n\nany idea how to keep the old color ?\n\n[img:360g6lqy]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Choosecol1&#46;jpg[/img:360g6lqy]\n\nadded a alert to the color-selection\n\n[img:360g6lqy]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Choosecol2&#46;jpg[/img:360g6lqy]\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "14:24", "topic": "A problem with function ChooseColor() ?", "username": "ukoenig" } ]
A problem with function ChooseColor() ?
[ { "date": "2016-02-06", "forum": "FiveWin for Harbour/xHarbour", "text": "Uwe,\n\nFWH function ChooseColor() supports two optional parameters:\n\n[url:24iafixz]http&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=fivewin_function_choosecolor[/url:24iafixz]\n\nAs the first parameter you may provide it the \"oldColor\" and that value will be returned\nwhen the user press cancel", "time": "21:30", "topic": "A problem with function ChooseColor() ?", "username": "Antonio Linares" } ]
A problem with function ChooseColor() ?
[ { "date": "2016-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\n\nthank You very much for the info.\nWith included parameters in < ChooseColor() > it works fine now.\nflag = 1 opens a small and flag = 2 opens a full color-selection.\n\nbest regards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "12:11", "topic": "A problem with function ChooseColor() ?", "username": "ukoenig" } ]
A problem with function ChooseColor() ?
[ { "date": "2016-12-14", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed with a mouseclick on a splitter,\nthe splitter is shown [color=#FF0000:21v4ec53]RESIZED[/color:21v4ec53]\nthe splitter is working adjusting the mouse-position\n\nMy GRADIENT-painting on panels is working \nbut is it possible to get a info about the new panelsize, if the horizontal splitter is moved ???\nI need it for a new gradient-calculation. \n\n[b:21v4ec53]The splitters :[/b:21v4ec53]\n\n[img:21v4ec53]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Panel1&#46;jpg[/img:21v4ec53]\n\n[b:21v4ec53]A Mouseclick on a splitter [/b:21v4ec53]\n\n[img:21v4ec53]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Hsplit&#46;jpg[/img:21v4ec53]\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "15:11", "topic": "A problem with splitters ?", "username": "ukoenig" } ]
A problem with splitters ?
[ { "date": "2016-12-14", "forum": "FiveWin for Harbour/xHarbour", "text": "Dear Uwe,\n\nHave you tried with oPanel:bResized ?", "time": "18:50", "topic": "A problem with splitters ?", "username": "Antonio Linares" } ]
A problem with splitters ?
[ { "date": "2017-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Compiling this sample:\n\n[code=fw:2zkow80f]<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 /><br />    <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />    <span style=\"color: #00C800;\">LOCAL</span> cVar := SPACE<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">35</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg<br /><br />    @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">GET</span> cVar<br /><br />    <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />             <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>;<br />             <span style=\"color: #0000ff;\">CENTER</span><br /><br />    <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span></div>[/code:2zkow80f]\n\nI get this warning in Harbour and xHarbour:\n\n[code=fw:2zkow80f]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">Harbour <span style=\"color: #000000;\">3.2</span>.0dev <span style=\"color: #000000;\">&#40;</span>r1605041350<span style=\"color: #000000;\">&#41;</span><br />Copyright <span style=\"color: #000000;\">&#40;</span>c<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">1999</span><span style=\"color: #000000;\">-2016</span>, http:<span style=\"color: #B900B9;\">//harbour-project.org/</span><br />test.prg<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">16</span><span style=\"color: #000000;\">&#41;</span> Warning W0004  Codeblock parameter <span style=\"color: #ff0000;\">'SELF'</span> declared but not used in <span style=\"color: #00C800;\">function</span> <span style=\"color: #ff0000;\">'MAIN'</span><br /> </div>[/code:2zkow80f]\n\n[code=fw:2zkow80f]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">xHarbour <span style=\"color: #000000;\">1.2</span><span style=\"color: #000000;\">.3</span> Intl. <span style=\"color: #000000;\">&#40;</span>SimpLex<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#40;</span>Build <span style=\"color: #000000;\">20170513</span><span style=\"color: #000000;\">&#41;</span><br />Copyright <span style=\"color: #000000;\">1999</span><span style=\"color: #000000;\">-2017</span>, http:<span style=\"color: #B900B9;\">//www.xharbour.org <!-- m --><a class=\"postlink\" href=\"http://www.harbour-project.org/\">http://www.harbour-project.org/</a><!-- m --></span><br />test.prg<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">16</span><span style=\"color: #000000;\">&#41;</span> Warning W0004  Codeblock parameter: <span style=\"color: #ff0000;\">'SELF'</span> declared but not used in <span style=\"color: #00C800;\">function</span>: <span style=\"color: #ff0000;\">'MAIN'</span></div>[/code:2zkow80f]\n\nThe problem is /w3 compiler switch that I want to use absolutely. In xHarbour I can use /wb- to avoid that warning but Harbour doesn't support that switch.\n\nAny ideas?\n\nEMG", "time": "16:01", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Dear Encrico\n\nWith /w0\nI can compile the sample without any warning\n\nRegards", "time": "16:46", "topic": "A problem with warnings", "username": "dagiayunus" } ]
A problem with warnings
[ { "date": "2017-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you, but you missed the point: I do want to use /w3.\n\nEMG", "time": "17:59", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nMaybe change this line:\n\n@ 1, 1 GET cVar\n\nTo this:\n\n@ 1, 1 GET cVar of oDlg\n\nJames", "time": "21:51", "topic": "A problem with warnings", "username": "James Bott" } ]
A problem with warnings
[ { "date": "2017-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "No, this is a reduced sample still showing the problem:\n\n[code=fw:2v5pfljt]<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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg<br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">CENTER</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span></div>[/code:2v5pfljt]\n\nEMG", "time": "21:58", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-19", "forum": "FiveWin for Harbour/xHarbour", "text": "The warning come from the codeblock\n\n[code=fw:3qa1h61a]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #000000;\">&#123;</span>|Self|<uInit><span style=\"color: #000000;\">&#125;</span></div>[/code:3qa1h61a]\n\nand all the other similar codeblock where we don't use all the parameters.\n\nEMG", "time": "22:02", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-20", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nIt seems that this is a valid warning, is it not? Or, are you just not wanting to see it regardless?\n\nJames", "time": "15:41", "topic": "A problem with warnings", "username": "James Bott" } ]
A problem with warnings
[ { "date": "2017-06-20", "forum": "FiveWin for Harbour/xHarbour", "text": "Yes, exactly (see my first post in this thread).\n\nEMG", "time": "15:45", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-20", "forum": "FiveWin for Harbour/xHarbour", "text": "I found in the warning.txt in the xhb folder.\n\nWARNING for XHB contrib users\n=============================\n\nThis contrib is deprecated and not maintained anymore.\n\nThis was originally meant as a temporary stop-gap solution to help migrating\nexisting code written for xHarbour to Harbour, plus a means of documenting\nthe differences between the these two branches of the language. The\nrecommended path is to gradually migrate to use native core Harbour functions\nand core language elements, then finalize that process by dropping the need\nfor this library.\n\nLinking this library and/or using its headers (`hbcompat.ch` and `xhb.ch` in\nparticular) may cause various unintended side-effects both at compilation\nand runtime.\n\nMost of this code is also never tested by this fork, and none of it is ever\nused, so the chances of bugs is higher than in other parts of Harbour.\n\nIf you can't do without some parts of this code, feel free to fork it locally\nor publicly and continue maintaining it there, otherwise try switching to\ncore Harbour functionality ASAP.\n\n-Viktor", "time": "16:29", "topic": "A problem with warnings", "username": "aferra" } ]
A problem with warnings
[ { "date": "2017-06-20", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you, but I can't see how this can be of any help regarding my problem.\n\nI repeat: I need to use /w3 warning level switch but I don't want to see all that warnings originated by codeblocks parameters (that belong to FWH and are out of my control). I use /wb- with xHarbour, how can I get the same result with Harbour?\n\nEMG", "time": "16:39", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-20", "forum": "FiveWin for Harbour/xHarbour", "text": "/es[<level>] set exit severity\n/w[<level>] set warning level number (0..3, default 1)\n\n\nStrange, it only works this way.\n\n\n[code=fw:30ha9tp1]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />&nbsp; &nbsp;/m /n /w1 /es2<br />&nbsp;</div>[/code:30ha9tp1]", "time": "21:31", "topic": "A problem with warnings", "username": "karinha" } ]
A problem with warnings
[ { "date": "2017-06-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Enrico,\n\nI have a couple modules where I haven't figured out what to change in the code to suppress certain warnings. I found that in harbour I can use #pragma to suppress the warning locally within the problem files.\n\n#pragma WARNINGLEVEL = 3 // or whatever\n#pragma ENABLEWARNINGS = OFF/ON\n\nRobb", "time": "02:05", "topic": "A problem with warnings", "username": "rhlawek" } ]
A problem with warnings
[ { "date": "2017-06-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you, but I don't know how to suppress codeblock parameters warning in Harbour, even using compiler switches. In xHarbour I'm using /wb- but Harbour doesn't support it.\n\nEMG", "time": "08:29", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2017-06-21", "forum": "FiveWin for Harbour/xHarbour", "text": "I don't know how to do it with a command line switch either, but with the pragmas I noted this will suppress the message for the specific section of effected code. Depending on code organization this can be a hassle to add, but does this not do what you want?\n\n#pragma WARNINGLEVEL = 1\n\n ACTIVATE DIALOG oDlg;\n ON INIT MSGINFO();\n CENTER\n\n#pragma WARNINGLEVEL = 3", "time": "16:44", "topic": "A problem with warnings", "username": "rhlawek" } ]
A problem with warnings
[ { "date": "2017-06-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Using your sample, this shows exactly how I have been dealing with this in my own code.\n\n[code=fw:19roiypd]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"Fivewin.ch\"</span><br /><br />#translate SUPPRESS_WARNING => <span style=\"color: #00D7D7;\">#pragma</span> WARNINGLEVEL = <span style=\"color: #000000;\">1</span><br />#translate RESTORE_WARNING  => <span style=\"color: #00D7D7;\">#pragma</span> WARNINGLEVEL = <span style=\"color: #000000;\">3</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<br /><br />    <span style=\"color: #00C800;\">LOCAL</span> cVar := SPACE<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">35</span> <span style=\"color: #000000;\">&#41;</span><br /><br />    <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg<br /><br />    @ <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">GET</span> cVar<br /><br />   SUPPRESS_WARNING<br /><br />   <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg;<br />            <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>;<br />            <span style=\"color: #0000ff;\">CENTER</span><br /><br />   RESTORE_WARNING<br /><br />   <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /> </div>[/code:19roiypd]", "time": "17:00", "topic": "A problem with warnings", "username": "rhlawek" } ]
A problem with warnings
[ { "date": "2017-06-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Understood, thank you. Unfortunately there are way too many points to change in a real application. Better use /w if there are no other way. <!-- s:-( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":-(\" title=\"Sad\" /><!-- s:-( --> Or keep using xHarbour. <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nEMG", "time": "18:15", "topic": "A problem with warnings", "username": "Enrico Maria Giordano" } ]
A problem with warnings
[ { "date": "2014-02-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nfocused on testing graphical-solutions, during my tests with my new xBrowse-sample,\nI noticed a problem with the [b:29gw2ksa]image-bottom [/b:29gw2ksa], using [color=#0000FF:29gw2ksa][b:29gw2ksa]cell-adjustment [/b:29gw2ksa][/color:29gw2ksa] ( missing some space ) \n[b:29gw2ksa]oBrw:aCols[ 8 ]:nDataBmpAlign [/b:29gw2ksa]\n\nThe next column ( Image 2 ), shows my [color=#0000FF:29gw2ksa][b:29gw2ksa]calculated[/b:29gw2ksa][/color:29gw2ksa] position. That works OK in all situations. \nThe defined CELLSIZE = [b:29gw2ksa]100 x 85[/b:29gw2ksa]\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign1&#46;jpg[/img:29gw2ksa]\n\nThe column-menu with the different adjustments :\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign2&#46;jpg[/img:29gw2ksa]\n\nMy [b:29gw2ksa]Calculation-result[/b:29gw2ksa], to move the image to cell-TOP :\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign3&#46;jpg[/img:29gw2ksa]\n\n[color=#0000FF:29gw2ksa][b:29gw2ksa]How to show the image 1 on TOP like Image 2 ( calculated ) ???[/b:29gw2ksa][/color:29gw2ksa]\n[color=#FF0000:29gw2ksa][b:29gw2ksa]AL_TOP missing ?[/b:29gw2ksa][/color:29gw2ksa]\n\n[color=#4000FF:29gw2ksa][b:29gw2ksa]MENUITEM \"Left Align\" WHEN oCol:nDataBmpAlign > 0 ;\nACTION ( oCol:nDataBmpAlign:= AL_LEFT, oCol:oBrw:Refresh() )\nMENUITEM \"Center Align\" WHEN oCol:nDataBmpAlign != AL_CENTER ;\nACTION ( oCol:nDataBmpAlign := AL_CENTER, oCol:oBrw:Refresh() )\nMENUITEM \"Right Align\" WHEN oCol:nDataBmpAlign != AL_RIGHT ;\nACTION ( oCol:nDataBmpAlign := AL_RIGHT , oCol:oBrw:Refresh() )[/b:29gw2ksa][/color:29gw2ksa]\n\n[size=150:29gw2ksa]The tool-preview[/size:29gw2ksa]\n\nMain-screen\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign4&#46;jpg[/img:29gw2ksa]\n\nThe test-dialog\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign5&#46;jpg[/img:29gw2ksa]\n\nThe Painter\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign6&#46;jpg[/img:29gw2ksa]\n\nA dialog with a painted dialog-title\n\n[img:29gw2ksa]http&#58;//www&#46;pflegeplus&#46;com/pictures/Cellalign7&#46;jpg[/img:29gw2ksa]\n\nBest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "14:17", "topic": "A problem with xBrowse Image Cell-Align ? ( + toolpreview )", "username": "ukoenig" } ]
A problem with xBrowse Image Cell-Align ? ( + toolpreview )
[ { "date": "2018-05-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Can you tell me why this sample selects the workarea 0 after closing the window?\n\n[code=fw:2wazi49p]<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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oWnd, oBrw, oCol<br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> aCell := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> , <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">SELECT</span> <span style=\"color: #000000;\">0</span><br /><br />&nbsp; &nbsp; USE CUSTOMER<br /><br />&nbsp; &nbsp; AADD<span style=\"color: #000000;\">&#40;</span> aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> , <span style=\"color: #ff0000;\">\"One\"</span> &nbsp; <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; AADD<span style=\"color: #000000;\">&#40;</span> aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> , <span style=\"color: #ff0000;\">\"Two\"</span> &nbsp; <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; AADD<span style=\"color: #000000;\">&#40;</span> aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> , <span style=\"color: #ff0000;\">\"Three\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">100</span> <span style=\"color: #0000ff;\">XBROWSE</span> oBrw <span style=\"color: #0000ff;\">OF</span> oWnd DATASOURCE aCell CELL LINES<br /><br />&nbsp; &nbsp; oCol = oBrw:<span style=\"color: #000000;\">AddCol</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; oCol:<span style=\"color: #000000;\">bEditValue</span> &nbsp; = <span style=\"color: #000000;\">&#123;</span> || aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> , oBrw:<span style=\"color: #000000;\">nArrayAt</span> &nbsp;<span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp; oBrw:<span style=\"color: #000000;\">CreateFromCode</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oWnd:<span style=\"color: #000000;\">oClient</span> = oBrw<br /><br />&nbsp; &nbsp; ? <span style=\"color: #ff0000;\">\"Before:\"</span>, <span style=\"color: #0000ff;\">ALIAS</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #0000ff;\">SELECT</span><span style=\"color: #000000;\">&#40;</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 />&nbsp; &nbsp; ? <span style=\"color: #ff0000;\">\"After:\"</span>, <span style=\"color: #0000ff;\">ALIAS</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #0000ff;\">SELECT</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></div>[/code:2wazi49p]\n\nEMG", "time": "14:51", "topic": "A problem with xBrowse and arrays", "username": "Enrico Maria Giordano" } ]
A problem with xBrowse and arrays
[ { "date": "2018-05-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Can you tell me why this sample selects the workarea 0 after closing the window?\n\n[code=fw:nlnhgpv4]<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 /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> oWnd, oBrw, oCol<br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">LOCAL</span> aCell := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> , <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> ,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">SELECT</span> <span style=\"color: #000000;\">0</span><br /><br />&nbsp; &nbsp; USE CUSTOMER<br /><br />&nbsp; &nbsp; AADD<span style=\"color: #000000;\">&#40;</span> aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> , <span style=\"color: #ff0000;\">\"One\"</span> &nbsp; <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; AADD<span style=\"color: #000000;\">&#40;</span> aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> , <span style=\"color: #ff0000;\">\"Two\"</span> &nbsp; <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; AADD<span style=\"color: #000000;\">&#40;</span> aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> , <span style=\"color: #ff0000;\">\"Three\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; @ <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">100</span> <span style=\"color: #0000ff;\">XBROWSE</span> oBrw <span style=\"color: #0000ff;\">OF</span> oWnd DATASOURCE aCell CELL LINES<br /><br />&nbsp; &nbsp; oCol = oBrw:<span style=\"color: #000000;\">AddCol</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; oCol:<span style=\"color: #000000;\">bEditValue</span> &nbsp; = <span style=\"color: #000000;\">&#123;</span> || aCell<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> , oBrw:<span style=\"color: #000000;\">nArrayAt</span> &nbsp;<span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp; oBrw:<span style=\"color: #000000;\">CreateFromCode</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; oWnd:<span style=\"color: #000000;\">oClient</span> = oBrw<br /><br />&nbsp; &nbsp; ? <span style=\"color: #ff0000;\">\"Before:\"</span>, <span style=\"color: #0000ff;\">ALIAS</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #0000ff;\">SELECT</span><span style=\"color: #000000;\">&#40;</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 />&nbsp; &nbsp; ? <span style=\"color: #ff0000;\">\"After:\"</span>, <span style=\"color: #0000ff;\">ALIAS</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #0000ff;\">SELECT</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></div>[/code:nlnhgpv4]\n\nEMG", "time": "14:52", "topic": "A problem with xBrowse and arrays", "username": "Enrico Maria Giordano" } ]
A problem with xBrowse and arrays
[ { "date": "2018-05-03", "forum": "FiveWin for Harbour/xHarbour", "text": "Thanks for pointing this out. This happens only when Evaluation of bEditValue results in an error. (In the present case when oBrw:nArrayAt > 3 ).\nThis does not happen where the bEditValue is valid for the entire browse.\nThis is fixed in 18.04.", "time": "04:20", "topic": "A problem with xBrowse and arrays", "username": "nageswaragunupudi" } ]
A problem with xBrowse and arrays
[ { "date": "2019-05-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed a problem with the xBrowse-keyboard usage\nI need the row- and column-position on cell-change using the keyboard\nOn mouseclick no problem.\nThe screenshot shows the problem\n\nmoving inside the SAME row to the next cell, the column-no. is not updated\nOnly changing the rowposition after the change it works. ( picture 2 and 3 )\n\ntested with ON CHANGE and\noBrw:bPainted := < |hDC|\n\n[code=fw:3fthjjse]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />@ <span style=\"color: #000000;\">5</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">SAY</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"Row :    \"</span> + LTRIM<span style=\"color: #000000;\">&#40;</span>STR<span style=\"color: #000000;\">&#40;</span>nRowPos<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">40</span>, <span style=\"color: #000000;\">10</span> ;<br /> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">COLOR</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">12124088</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">OF</span> oDlg  <br />@ <span style=\"color: #000000;\">5</span>, <span style=\"color: #000000;\">90</span> <span style=\"color: #0000ff;\">SAY</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"Column :    \"</span> + LTRIM<span style=\"color: #000000;\">&#40;</span>STR<span style=\"color: #000000;\">&#40;</span>nColPos<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">60</span>, <span style=\"color: #000000;\">10</span> ;<br /> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">COLOR</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">12124088</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">OF</span> oDlg  <br />...<br />...<br /><span style=\"color: #B900B9;\">// xBrowse :</span><br /> <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">CHANGE</span>  <span style=\"color: #000000;\">&#40;</span> nColPos := oBrw:<span style=\"color: #000000;\">SelectedCol</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">nCreationOrder</span>, ;<br />              nRowPos := oBrw:<span style=\"color: #000000;\">Keyno</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ;<br />                       oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ; <span style=\"color: #B900B9;\">// row-info</span><br />                       oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// column-info</span><br /> </div>[/code:3fthjjse]\n\n[img:3fthjjse]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Colpos1&#46;jpg[/img:3fthjjse]\n\nmaybe another possible solution <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "14:16", "topic": "A problem with xBrowse-keyboard navigation ?", "username": "ukoenig" } ]
A problem with xBrowse-keyboard navigation ?
[ { "date": "2019-05-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Your observation is not correct.\nThe SelectedCol() and nColSel are updated even when the column is changed by arrow keys.\n\nBut by default, your bChange is called when row is changed but not when column only is changed. \nIf you set oBrw:lColChangeNotify := .T. (default .f.), your on change code can see the changes in the selected column also.", "time": "17:58", "topic": "A problem with xBrowse-keyboard navigation ?", "username": "nageswaragunupudi" } ]
A problem with xBrowse-keyboard navigation ?
[ { "date": "2019-05-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr. Rao,\n\n[quote:10fohnz9]If you set oBrw:lColChangeNotify := .T. (default .f.), your on change code \ncan see the changes in the selected column also.[/quote:10fohnz9]\n\nthank You very much.\nThat was the missing info. It is working now and returns the selected column-number.\n\nregards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "19:03", "topic": "A problem with xBrowse-keyboard navigation ?", "username": "ukoenig" } ]
A problem with xBrowse-keyboard navigation ?
[ { "date": "2019-05-02", "forum": "FiveWin for Harbour/xHarbour", "text": "Mr. Rao,\n\n[quote:2voinypm]If you set oBrw:lColChangeNotify := .T. (default .f.), your on change code \ncan see the changes in the selected column also.[/quote:2voinypm]\n\nthank You very much.\nThat was the missing info. It is working now and returns the selected column-number.\n\nregards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "19:03", "topic": "A problem with xBrowse-keyboard navigation ?", "username": "ukoenig" } ]
A problem with xBrowse-keyboard navigation ?
[ { "date": "2021-04-26", "forum": "FiveWin for Harbour/xHarbour", "text": "A alphablended JPG with xImage how is that possible <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \nThe normal formats using transparent are : GIF, PNG, TIF and BMP\n\n[img:23r2tid9]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/xImage5&#46;jpg[/img:23r2tid9]\n\n[size=150:23r2tid9]the original JPG[/size:23r2tid9]\n\n[img:23r2tid9]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/Picture9&#46;jpg[/img:23r2tid9]\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "15:16", "topic": "A problem with xImage and JPG", "username": "ukoenig" } ]
A problem with xImage and JPG
[ { "date": "2021-04-26", "forum": "FiveWin for Harbour/xHarbour", "text": "Example, PRG?\n\nRegards.", "time": "17:08", "topic": "A problem with xImage and JPG", "username": "karinha" } ]
A problem with xImage and JPG
[ { "date": "2021-04-26", "forum": "FiveWin for Harbour/xHarbour", "text": "Nothing extra.\nIt is the original sample xImage01.prg from the sample-folder\nYou can test it from there.\nFor the test I added the image to the imagefolder thats all.\nJust see the picture above\n\nregards\nUwe", "time": "17:23", "topic": "A problem with xImage and JPG", "username": "ukoenig" } ]
A problem with xImage and JPG
[ { "date": "2021-04-26", "forum": "FiveWin for Harbour/xHarbour", "text": "Master, this JPG is damaged. I opened it with IRFANVIEW.EXE and the image is not perfect. Try another one please.\n\nGreetings.", "time": "17:57", "topic": "A problem with xImage and JPG", "username": "karinha" } ]
A problem with xImage and JPG
[ { "date": "2021-04-26", "forum": "FiveWin for Harbour/xHarbour", "text": "Look,\n\n[img:mdr72hkv]https&#58;//i&#46;imgur&#46;com/Pj7Glhx&#46;png[/img:mdr72hkv]\n\nRegards.", "time": "18:16", "topic": "A problem with xImage and JPG", "username": "karinha" } ]
A problem with xImage and JPG
[ { "date": "2021-04-26", "forum": "FiveWin for Harbour/xHarbour", "text": "I*m using a professional sofware PHOTOSHOP and there is no error.\n\nMost of JPG-files don't use solid colors on the border-area.\nThat is the reason black is shown transparent.\nWith my new < cellborder-tool > it is possible to test it as well.\nThe image-selection from the browser is using xImage.\n\nI tested some more JPG*s\n\nthe problem belongs to JPG-images with some SOLID colorspaces from the outside\nNext I painted a [b:3cwfmtip]SOLID[/b:3cwfmtip] freehand-border around image Olga1.jpg\nA normal JPG without solid colors doesn*t have any problems\n\n[img:3cwfmtip]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/xImage6&#46;jpg[/img:3cwfmtip]\n\n[img:3cwfmtip]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/Olga2&#46;jpg[/img:3cwfmtip]\n\nImages can be tested here :\n\n[img:3cwfmtip]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/Bord2&#46;jpg[/img:3cwfmtip]\n\n[img:3cwfmtip]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/Bord7&#46;jpg[/img:3cwfmtip]\n\nregards\nUwe", "time": "18:46", "topic": "A problem with xImage and JPG", "username": "ukoenig" } ]
A problem with xImage and JPG
[ { "date": "2021-04-27", "forum": "FiveWin for Harbour/xHarbour", "text": "Please try chaing oBrw:bChange as\n[code=fw:13uw2lrd]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp; &nbsp; &nbsp;:<span style=\"color: #000000;\">bChange</span> &nbsp; &nbsp; &nbsp; := <span style=\"color: #000000;\">&#123;</span> || oImage:<span style=\"color: #000000;\">lBmpTransparent</span> := !<span style=\"color: #000000;\">&#40;</span> Lower<span style=\"color: #000000;\">&#40;</span> cFileExt<span style=\"color: #000000;\">&#40;</span> oBrw:<span style=\"color: #000000;\">aRow</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> $ <span style=\"color: #ff0000;\">\"jpg,jpeg\"</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImage:<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 />&nbsp;</div>[/code:13uw2lrd]", "time": "07:31", "topic": "A problem with xImage and JPG", "username": "nageswaragunupudi" } ]
A problem with xImage and JPG
[ { "date": "2021-04-27", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank You very much\nit is working now <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \nsolid color-areas are rarely inside JPG-files special on the outline area <!-- s:roll: --><img src=\"{SMILIES_PATH}/icon_rolleyes.gif\" alt=\":roll:\" title=\"Rolling Eyes\" /><!-- s:roll: --> \n\n[img:nhts0af6]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/Border13&#46;jpg[/img:nhts0af6]\n\nregards\nUwe", "time": "13:38", "topic": "A problem with xImage and JPG", "username": "ukoenig" } ]
A problem with xImage and JPG
[ { "date": "2015-09-18", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nis it possible to use xbrowse total with a index UNIQUE ?\n\nsample :\nA customer can have many bills the same time\neach bill can have many positions\n[color=#0000FF:1y7j1sej]each position[/color:1y7j1sej] includes the [b:1y7j1sej]invoice total[/b:1y7j1sej]\nusing index UNIQUE I display each bill with the invoice total [b:1y7j1sej]only once[/b:1y7j1sej]\n\nthe problem\nxbrowse total is counting ALL positions. UNIQUE is ignored.\n\n[img:1y7j1sej]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/XbrwTotal1&#46;jpg[/img:1y7j1sej]\n\nanother section shows the details of a bill ( positions )\n\n[img:1y7j1sej]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/XbrwTotal2&#46;jpg[/img:1y7j1sej]\n\nmaybe a different solution needed ?\nI could calculate each column and display the result using the footer\n\nMy working test\n\n[img:1y7j1sej]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/XbrwTotal3&#46;jpg[/img:1y7j1sej]\n\ncounting the column-values\n\n[code=fw:1y7j1sej]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />The used and created <span style=\"color: #0000ff;\">index</span><br /><br />NET_USE <span style=\"color: #000000;\">&#40;</span> c_Pfad3 + cRMonat + <span style=\"color: #ff0000;\">\".DBF\"</span>, cRMonat, <span style=\"color: #000000;\">3</span>,.F. <span style=\"color: #000000;\">&#41;</span> = .T.<br />     ORDCREATE<span style=\"color: #000000;\">&#40;</span> ,<span style=\"color: #ff0000;\">\"STAT\"</span>, <span style=\"color: #ff0000;\">\"UPPER(PAT_NNAME + PAT_VNAME) + STR(RECHNG_ZAE)\"</span>, ;<br />     <span style=\"color: #000000;\">&#123;</span>|| STR<span style=\"color: #000000;\">&#40;</span>RECHNG_ZAE<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> , .T. <span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #B900B9;\">// .T. = UNIQUE</span><br /><br />TOTAL defined in <span style=\"color: #0000ff;\">xBrowse</span><br /><br />WITH OBJECT oBrw1<br />     <span style=\"color: #00C800;\">FOR</span> I := <span style=\"color: #000000;\">5</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">13</span><br />          :<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span> I <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">nWidth</span> := <span style=\"color: #000000;\">75</span><br />          :<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span> I <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">nDataStrAlign</span>   := AL_RIGHT<br />          :<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span> I <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">nHeadStrAlign</span>   := AL_CENTER<br />          :<span style=\"color: #000000;\">MakeTotals</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// not working</span><br />          :<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span> I <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">lTotal</span> := .T.<br />          :<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span> I <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">nTotal</span> := <span style=\"color: #000000;\">0</span><br />     <span style=\"color: #00C800;\">NEXT</span><br />END<br /><br />Footer values REPLACED WITH :<br /><br /><span style=\"color: #000000;\"><span style=\"color: #000000;\">&#40;</span>cRMonat</span><span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br />nReNr := <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->RECHNG_ZAE<br /><span style=\"color: #00C800;\">DO</span> <span style=\"color: #00C800;\">WHILE</span> !EOF<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />        <span style=\"color: #00C800;\">IF</span> <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"KrK\"</span>  <span style=\"color: #B900B9;\">// different bill-types</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->K1_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"KrX\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->K2_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"PrX\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->PR_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"PfK\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->P0_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"PfB\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">5</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->P1_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"B1K\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">6</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->PB1_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"B1P\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">7</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->PB2_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"B2K\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">8</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->P2_SUMME<br />        ELSEIF <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->KENNER = <span style=\"color: #ff0000;\">\"B2P\"</span><br />            nValue<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">9</span><span style=\"color: #000000;\">&#93;</span> += <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->P3_SUMME<br />        <span style=\"color: #00C800;\">ENDIF</span><br /><br />        <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBSKIP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">+1</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br />        <span style=\"color: #00C800;\">IF</span> nReNr = <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->RECHNG_ZAE<br />            <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBSKIP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">+1</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />            nReNr := <span style=\"color: #000000;\">&#40;</span>cRMonat<span style=\"color: #000000;\">&#41;</span>->RECHNG_ZAE<br />        <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">ENDDO</span><br /><br /> </div>[/code:1y7j1sej]\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "19:21", "topic": "A problem xBrowse Total and Index UNIQUE", "username": "ukoenig" } ]
A problem xBrowse Total and Index UNIQUE
[ { "date": "2015-09-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Same result using a original FWH-sample\n\n[img:h7tegiov]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/XbrwTotal4&#46;jpg[/img:h7tegiov]\n\nNot possible to refresh footers with total\ncalculated footers are working fine\n\n[img:h7tegiov]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/XbrwTotal5&#46;jpg[/img:h7tegiov]\n\nI created a CUSTOMER.dbf with some equal names !!! for testing UNIQUE\n\n[code=fw:h7tegiov]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">'fivewin.ch'</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">'ord.ch'</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">'xbrowse.ch'</span><br /><br />REQUEST DBFCDX<br /><br /><span style=\"color: #B900B9;\">//---------------------------------</span><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> oDlg, oBrw1, oBrw2, oFont<br /><span style=\"color: #00C800;\">local</span> nMaxSal &nbsp;:= <span style=\"color: #000000;\">0</span>, nValue := <span style=\"color: #000000;\">0</span><br /><span style=\"color: #00C800;\">local</span> nProgClr := RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">161</span>, <span style=\"color: #000000;\">224</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br /><br />XBrNumFormat<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'E'</span>, .t. <span style=\"color: #000000;\">&#41;</span><br /><br />USE customer <span style=\"color: #00C800;\">NEW</span> SHARED <span style=\"color: #0000ff;\">ALIAS</span> CUST VIA <span style=\"color: #ff0000;\">'DBFCDX'</span><br />ORDCREATE<span style=\"color: #000000;\">&#40;</span> ,<span style=\"color: #ff0000;\">\"CUST1\"</span>, <span style=\"color: #ff0000;\">\"UPPER(LAST)\"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#123;</span>|| UPPER<span style=\"color: #000000;\">&#40;</span>LAST<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> , .F. <span style=\"color: #000000;\">&#41;</span> &nbsp;<span style=\"color: #B900B9;\">// .T. = UNIQUE</span><br />ORDCREATE<span style=\"color: #000000;\">&#40;</span> ,<span style=\"color: #ff0000;\">\"CUST2\"</span>, <span style=\"color: #ff0000;\">\"UPPER(LAST)\"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#123;</span>|| UPPER<span style=\"color: #000000;\">&#40;</span>LAST<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> , .T. <span style=\"color: #000000;\">&#41;</span> &nbsp;<span style=\"color: #B900B9;\">// .T. = UNIQUE</span><br /><br />DBSETORDER<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"CUST1\"</span><span style=\"color: #000000;\">&#41;</span><br /><br />DBEval<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> || nMaxSal := <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> nMaxSal, FIELD->Salary <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />GO TOP<br /><br /><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"TAHOMA\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-12</span><br /><br /><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">500</span>, <span style=\"color: #000000;\">520</span> <span style=\"color: #0000ff;\">PIXEL</span> ;<br /><span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Progress Bars in XBrowse\"</span> ;<br /><span style=\"color: #0000ff;\">FONT</span> oFont<br /><br />@ <span style=\"color: #000000;\">10</span>,<span style=\"color: #000000;\">10</span> <span style=\"color: #0000ff;\">XBROWSE</span> oBrw1 ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style=\"color: #ff0000;\">'Last'</span>, <span style=\"color: #ff0000;\">'Age'</span>, <span style=\"color: #ff0000;\">'Salary'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">220</span>, <span style=\"color: #000000;\">100</span> <span style=\"color: #0000ff;\">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; PICTURES <span style=\"color: #00C800;\">nil</span>, <span style=\"color: #ff0000;\">'999.99 %'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">'CUST'</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES AUTOSORT NOBORDER FOOTERS<br /><br />WITH OBJECT oBrw1:<span style=\"color: #000000;\">Salary</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">SetProgBar</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> || nMaxSal <span style=\"color: #000000;\">&#125;</span>,, <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #000000;\">&#123;</span> nProgClr, CLR_WHITE <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nDataStrAlign</span> := AL_RIGHT<br />END<br /><br />WITH OBJECT oBrw1:<span style=\"color: #000000;\">Age</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">cHeader</span> &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'Percent'</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">SetProgBar</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">104</span>, <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #000000;\">&#123;</span> nProgClr, CLR_WHITE <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nDataStrAlign</span> := AL_RIGHT<br />END<br /><br />WITH OBJECT oBrw1<br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nStretchCol</span> &nbsp; := <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">CreateFromCode</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />END<br /><br />nValue := FOOTER_UPD<span style=\"color: #000000;\">&#40;</span>nValue<span style=\"color: #000000;\">&#41;</span><br />oBrw1:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">cFooter</span> := nValue<br /><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">'CUST'</span><span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />oBrw1:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">// -----------------</span><br /><br />@ <span style=\"color: #000000;\">150</span>,<span style=\"color: #000000;\">10</span> <span style=\"color: #0000ff;\">XBROWSE</span> oBrw2 ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style=\"color: #ff0000;\">'Last'</span>, <span style=\"color: #ff0000;\">'Age'</span>, <span style=\"color: #ff0000;\">'Salary'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">220</span>, <span style=\"color: #000000;\">100</span> <span style=\"color: #0000ff;\">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; PICTURES <span style=\"color: #00C800;\">nil</span>, <span style=\"color: #ff0000;\">'999.99 %'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">'CUST'</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES AUTOSORT NOBORDER FOOTERS<br /><br />WITH OBJECT oBrw2:<span style=\"color: #000000;\">Salary</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nTotal</span> &nbsp; &nbsp; := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">lTotal</span> &nbsp; &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">SetProgBar</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#123;</span> || nMaxSal <span style=\"color: #000000;\">&#125;</span>,, <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #000000;\">&#123;</span> nProgClr, CLR_WHITE <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nDataStrAlign</span> := AL_RIGHT<br />END<br /><br />WITH OBJECT oBrw2:<span style=\"color: #000000;\">Age</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">cHeader</span> &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">'Percent'</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">SetProgBar</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">104</span>, <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #000000;\">&#123;</span> nProgClr, CLR_WHITE <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nDataStrAlign</span> := AL_RIGHT<br />END<br /><br />WITH OBJECT oBrw2<br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">nStretchCol</span> &nbsp; := <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp; &nbsp; :<span style=\"color: #000000;\">MakeTotals</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<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: #000000;\">120</span>,<span style=\"color: #000000;\">70</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Normal\"</span> <span style=\"color: #0000ff;\">size</span> <span style=\"color: #000000;\">40</span>,<span style=\"color: #000000;\">20</span> &nbsp;<span style=\"color: #0000ff;\">OF</span> oDlg <span style=\"color: #0000ff;\">PIXEL</span> ;<br /><span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> DBSETORDER<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"CUST1\"</span><span style=\"color: #000000;\">&#41;</span>, nValue := FOOTER_UPD<span style=\"color: #000000;\">&#40;</span>nValue<span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">'CUST'</span><span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw1:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">cFooter</span> := nValue, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw1:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oBrw2:<span style=\"color: #000000;\">RefreshFooters</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oBrw2:<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 />@ <span style=\"color: #000000;\">120</span>,<span style=\"color: #000000;\">150</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Unique\"</span> <span style=\"color: #0000ff;\">size</span> <span style=\"color: #000000;\">40</span>,<span style=\"color: #000000;\">20</span> &nbsp;<span style=\"color: #0000ff;\">OF</span> oDlg <span style=\"color: #0000ff;\">PIXEL</span> ;<br /><span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> DBSETORDER<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"CUST2\"</span><span style=\"color: #000000;\">&#41;</span>, nValue := FOOTER_UPD<span style=\"color: #000000;\">&#40;</span>nValue<span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">'CUST'</span><span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw1:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">cFooter</span> := nValue, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw1:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oBrw2:<span style=\"color: #000000;\">RefreshFooters</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oBrw2:<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 /><span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTERED</span><br /><br /><span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /><br /><span style=\"color: #B900B9;\">// ---------------</span><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> FOOTER_UPD<span style=\"color: #000000;\">&#40;</span>nValue<span style=\"color: #000000;\">&#41;</span><br /><br />nValue := <span style=\"color: #000000;\">0</span><br /><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">'CUST'</span><span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">DO</span> <span style=\"color: #00C800;\">WHILE</span> !EOF<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; nValue += <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">'CUST'</span><span style=\"color: #000000;\">&#41;</span>->Salary<br />&nbsp; &nbsp; <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">'CUST'</span><span style=\"color: #000000;\">&#41;</span>-><span style=\"color: #000000;\">&#40;</span>DBSKIP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">+1</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ENDDO</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> nValue<br />&nbsp;</div>[/code:h7tegiov]\n\nbest regards\nUwe <!-- s:? --><img src=\"{SMILIES_PATH}/icon_confused.gif\" alt=\":?\" title=\"Confused\" /><!-- s:? -->", "time": "20:05", "topic": "A problem xBrowse Total and Index UNIQUE", "username": "ukoenig" } ]
A problem xBrowse Total and Index UNIQUE
[ { "date": "2015-11-27", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed a problem us RELATION\n\n[color=#0000FF:tdkxkbds]DBSELECTAREA( \"KUNDE\" )\n( \"KUNDE\" )->(DBSETORDER( \"KUNDE1\" ))\n( \"KUNDE\" )->( ORDSETRELATION( cMonat, { || UPPER(NAME1 + NAME) }, \"UPPER(NAME1 + NAME)\" ) )\n( \"KUNDE\" )->( DBGOTOP() )[/color:tdkxkbds]\n\nAfter selecting a row in browser 2, the values are displayed but the position moves to row 1\nselecting again the same row, everything is ok.\nIt happens only with the 1. selection.\nIs it possible after the 1. selection to stay in the selected row ?\nRemoving the [color=#0000FF:tdkxkbds]RELATION[/color:tdkxkbds], there is no problem. \n\n[img:tdkxkbds]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Relation1&#46;jpg[/img:tdkxkbds]\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "12:24", "topic": "A problem xBrowse and RELATION of 2 DBF's", "username": "ukoenig" } ]
A problem xBrowse and RELATION of 2 DBF's
[ { "date": "2015-11-27", "forum": "FiveWin for Harbour/xHarbour", "text": "A test with a created sample ( a combination of UNIQUE and RELATION ).\nThe same effect :\nOn 1. click in browser 2 on row 4 < Acker > ( selected in browser 1 ), \nthe 1. row is shown as selected ( moved )\nOn 2. click ( same row ) the selected row stays activated.\nThe effect is shown only on FIRST CLICK !!! \n\nSelecting another name in browser 1 and going back to < Acker >\nthe same effect happens.\n\nThe sample includes 2 DBF's with the same names\nIn DBF 2, Acker is defined 4 times testing RELATION\n\nThe UNIQUE - test-button shows < Fuller > defined twice in browser 1 only once\n\nDownload :\n<!-- m --><a class=\"postlink\" href=\"http://www.pflegeplus.com/DOWNLOADS/Relation1.zip\">http://www.pflegeplus.com/DOWNLOADS/Relation1.zip</a><!-- m -->\n\n[img:2re37qgp]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Relation2&#46;jpg[/img:2re37qgp]\n\n\nUSE customer1 NEW SHARED ALIAS CUST1 VIA 'DBFCDX'\nORDCREATE( ,\"CUST1\", \"UPPER(LAST)\", ;\n\t\t{|| UPPER(LAST) } , .F. ) \nORDCREATE( ,\"CUST2\", \"UPPER(LAST)\", ;\n\t\t{|| UPPER(LAST) } , .T. ) // .T. = UNIQUE\nDBSETORDER(\"CUST1\")\n\nUSE customer2 NEW SHARED ALIAS CUST2 VIA 'DBFCDX'\nORDCREATE( ,\"CUST3\", \"UPPER(LAST)\", ;\n\t\t{|| UPPER(LAST) } , .F. ) \nDBSETORDER(\"CUST3\")\n\n--------\n\nDBSELECTAREA( \"CUST1\" )\n(\"CUST1\")->(DBSETORDER( \"CUST1\" ))\n(\"CUST1\")->( ORDSETRELATION( \"CUST2\", { || UPPER(LAST) }, \"UPPER(LAST)\" ) )\n(\"CUST1\")->( DBGOTOP() )\n\n@ 10,10 XBROWSE oBrw1 ;\nCOLUMNS 'Last', 'Age', 'Salary' ;\nOF oDlg ;\nSIZE 220, 100 PIXEL ;\nPICTURES nil, '999.99 %' ;\n[color=#008000:2re37qgp][b:2re37qgp]ALIAS 'CUST1' ;[/b:2re37qgp][/color:2re37qgp]\nCELL LINES AUTOSORT NOBORDER FOOTERS\n...\n...\n@ 150,10 XBROWSE oBrw2 ;\nCOLUMNS 'Last', 'Age', 'Salary' ;\nOF oDlg ;\nSIZE 220, 100 PIXEL ;\nPICTURES nil, '999.99 %' ;\n[color=#0000FF:2re37qgp][b:2re37qgp]ALIAS 'CUST2' ;[/b:2re37qgp][/color:2re37qgp]\nCELL LINES AUTOSORT NOBORDER FOOTERS\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "17:40", "topic": "A problem xBrowse and RELATION of 2 DBF's", "username": "ukoenig" } ]
A problem xBrowse and RELATION of 2 DBF's
[ { "date": "2015-11-27", "forum": "FiveWin for Harbour/xHarbour", "text": "added a SAY of the selected salary to show the problem.\nthe selected salary of row 4 is shown but doesn't stay in row 4 and moves to row 1\nIt happens ONLY on 1. click. The Second click is ok.\n\n[img:2wcmepje]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Relation3&#46;jpg[/img:2wcmepje]\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "18:54", "topic": "A problem xBrowse and RELATION of 2 DBF's", "username": "ukoenig" } ]
A problem xBrowse and RELATION of 2 DBF's
[ { "date": "2015-11-29", "forum": "FiveWin for Harbour/xHarbour", "text": "I tested and saw the problem.\n\nOn the other hand, why not use scopes?\n\nRegards.", "time": "03:56", "topic": "A problem xBrowse and RELATION of 2 DBF's", "username": "FranciscoA" } ]
A problem xBrowse and RELATION of 2 DBF's
[ { "date": "2015-11-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Francisco,\nthank You very much.\n\nI changed the source-part using SCOPES and it works perfect without this funny jump-effect.\nI didn't think about this solution.\nIt was a translation of a part from Clipper-times I didn't change and I kept the logic using RELATION.\n\nbest regards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "12:32", "topic": "A problem xBrowse and RELATION of 2 DBF's", "username": "ukoenig" } ]
A problem xBrowse and RELATION of 2 DBF's
[ { "date": "2015-12-02", "forum": "FiveWin for Harbour/xHarbour", "text": "A extended sample with some new tests\n\nDownload :\n<!-- m --><a class=\"postlink\" href=\"http://www.pflegeplus.com/DOWNLOADS/Xbrwtest3.zip\">http://www.pflegeplus.com/DOWNLOADS/Xbrwtest3.zip</a><!-- m -->\n\n\n[color=#0040FF:gh5hs6e2][b:gh5hs6e2]1. testing SCOPE ( browser 2 )\n2. scoped browser with record MOVE-test\n3. drawing boxes and lines on ALL brushes with auto-DELETE-function\n4. autodelete of boxes and line ( timer )[/b:gh5hs6e2][/color:gh5hs6e2]\n\n[b:gh5hs6e2]requested from :[/b:gh5hs6e2]\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=31653\">viewtopic.php?f=3&t=31653</a><!-- l -->\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=31545\">viewtopic.php?f=3&t=31545</a><!-- l -->\n\n[img:gh5hs6e2]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Boxes1&#46;jpg[/img:gh5hs6e2]\n\nbest regards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "19:40", "topic": "A problem xBrowse and RELATION of 2 DBF's", "username": "ukoenig" } ]
A problem xBrowse and RELATION of 2 DBF's
[ { "date": "2017-06-06", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI noticed a problem on SEEK with a field-combination numeric + character\nI need the field < klasse0 > defined, because it is a GROUP-number.\n\nDOESN't work ! \nwrong results\ntyping < 1 > shows 100 and next 150\n\n[color=#008000:3deygjfn]The seek works with < [b:3deygjfn]SPACE[/b:3deygjfn] + 1 + 5 [/color:3deygjfn]>\n\n[color=#FF0000:3deygjfn]ORDCREATE( ,\"LEISTG1\",\"STR(Klasse0) + Leistung\", ; // N 3.0 + C 15\n{|| STR(Klasse0) + Leistung } , .F. )[/color:3deygjfn]\n\n[img:3deygjfn]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Seek12&#46;jpg[/img:3deygjfn]\n\nONLY the numeric field\nWORKS searching group 15 !\nshows 1 and next 15\n\n[color=#008000:3deygjfn]ORDCREATE( ,\"LEISTG1\",\"Klasse0\",;\n{|| Klasse0 }, .F. )[/color:3deygjfn]\n\n[img:3deygjfn]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Seek11&#46;jpg[/img:3deygjfn]\n\nany idea ?\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "14:05", "topic": "A problem xBrowse seek < numeric + character >", "username": "ukoenig" } ]
A problem xBrowse seek < numeric + character >
[ { "date": "2017-06-06", "forum": "FiveWin for Harbour/xHarbour", "text": "XBrowse simply uses \ndbseek( upper( trim( cSeek ) ) \n\nxbrowse incremental seek works the same way as dbseek.", "time": "15:15", "topic": "A problem xBrowse seek < numeric + character >", "username": "nageswaragunupudi" } ]
A problem xBrowse seek < numeric + character >