topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Border
|
oSheet:Cells(i+1,10):Borders(7):Linestyle = 1 // left
oSheet:Cells(i+1,10):Borders(8):Linestyle = 1 // up
oSheet:Cells(i+1,10):Borders(9):Linestyle = 1 // bottom
oSheet:Cells(i+1,10):Borders(10):Linestyle = 1 // right
|
Border
|
Thanks Mr Massimo
It works.
Regards
ACWoo
|
Border around GET
|
Dear All,
How to make border around Get like this
[img:2hay8ioe]http://i208.photobucket.com/albums/bb82/fraxzi/FWxHarbour/borderGet.png[/img:2hay8ioe]
I need to put this on empty Get Object and remove if filled with value..
Regards,
Frances
|
Border around GET
|
[img:di2jsto0]http://img576.imageshack.us/img576/2448/getround.png[/img:di2jsto0]
on Paint method
BEFORE ::DispEnd( aInfo )
RoundRect(::hDc,0,0,::nWidth-1,::nHeight-1,9,9)
THEN TRY WITH XPLOOK.RC
DEFINE DIALOG oDlg SIZE 400,200 TITLE "I am a DialogBox"
@ 2, 3 GET oGet var cTest OF oDlg NOBORDER
@ 6, 3 GET oGet var cTest OF oDlg NOBORDER
ACTIVATE DIALOG oDlg CENTERED
BUT THIS IS ONLY AN small idea ....
|
Border around GET
|
[quote="Silvio":17u9u2ih][img:17u9u2ih]http://img576.imageshack.us/img576/2448/getround.png[/img:17u9u2ih]
on Paint method
BEFORE ::DispEnd( aInfo )
RoundRect(::hDc,0,0,::nWidth-1,::nHeight-1,9,9)
THEN TRY WITH XPLOOK.RC
DEFINE DIALOG oDlg SIZE 400,200 TITLE "I am a DialogBox"
@ 2, 3 GET oGet var cTest OF oDlg NOBORDER
@ 6, 3 GET oGet var cTest OF oDlg NOBORDER
ACTIVATE DIALOG oDlg CENTERED
BUT THIS IS ONLY AN small idea ....[/quote:17u9u2ih]
Dear Silvio,
Thank you for the idea.. I really appreciate it..
I wish a method not to change class.. and border is much larger where I can revert to default (or remove it) when validation is ok.
Best regards,
Frances
|
Border around GET
|
Maybe ( with any Color and Pen-Size ) ???
[img:32devp68]http://www.service-fivewin.de/pictures/getbox.jpg[/img:32devp68]
REDEFINE GET oGET1 VAR cGET1 ID 250 OF oDlg UPDATE
// TOP, LEFT, hDC, WIDTH, HEIGHT, PEN, COLOR
oGet1:bPainted := { |hDC| [color=#FF0000:32devp68]DRAWBOX[/color:32devp68]( 0, 0, hDC, oGet1:nWidth-5, oGet1:nHeight-5, 3, 128 ) }
// -------- DRAW Get-BOX --------------------------------' )
STATIC FUNCTION [color=#FF0000:32devp68]DRAWBOX[/color:32devp68]( nTOP, nLEFT, hDC, nLONG, nHIGHT, nPEN, nCOLOR )
LOCAL hPen := CREATEPEN( PS_SOLID, nPEN, nColor )
LOCAL hOldPen := SELECTOBJECT( hDC, hPen )
MOVETO( hDC, nTOP, nLEFT )
LINETO( hDC, nLong, 0 )
LINETO( hDC, nLONG, nHIGHT )
LINETO( hDC, 0, nHIGHT )
LINETO( hDC, 0, 0 )
SELECTOBJECT( hDC, hOldPen )
DELETEOBJECT( hPen )
RETURN NIL
================================
To [color=#FF0000:32devp68]move a Box [/color:32devp68]to the foused Get is very easy :
Instead of Focus, You can change the Logic using Valid
[img:32devp68]http://www.service-fivewin.de/pictures/getbox1.jpg[/img:32devp68]
Use a Startflag for the 1. focused Get :
[color=#FF0000:32devp68]nPos[/color:32devp68] := 1
REDEFINE GET oGET1 VAR cGET1 ID 250 OF oDlg UPDATE
// TOP, LEFT, hDC, WIDTH, HEIGHT, PEN, COLOR
oGet1:bPainted := { |hDC| IIF( nPos = 1, ( DRAWBOX( 0, 0, hDC, oGet1:nWidth-5, oGet1:nHeight-5, 3, 128 ), ;
DRAWBOX( 0, 0, hDC, 0, 0, 0, 0) ), NIL) }
oGet1:bGotFocus := { |hDC| nPos := 1, [color=#FF0000:32devp68]oGet2:Refresh(), oGet3:Refresh() [/color:32devp68]}
REDEFINE GET oGET2 VAR cGET2 ID 260 OF oDlg UPDATE
oGet2:bPainted := { |hDC| IIF( nPos = 2, ( DRAWBOX( 0, 0, hDC, oGet2:nWidth-5, oGet2:nHeight-5, 3, 128 ), ;
DRAWBOX( 0, 0, hDC, 0, 0, 0, 0) ), NIL) }
oGet2:bGotFocus := { |hDC| nPos := 2, [color=#FF0000:32devp68]oGet1:Refresh(), oGet3:Refresh() [/color:32devp68]}
REDEFINE GET oGET3 VAR cGET3 ID 270 OF oDlg UPDATE
oGet3:bPainted := { |hDC| IIF( nPos = 3, ( DRAWBOX( 0, 0, hDC, oGet3:nWidth-5, oGet3:nHeight-5, 3, 128 ), ;
DRAWBOX( 0, 0, hDC, 0, 0, 0, 0) ), NIL) }
oGet3:bGotFocus := { |hDC| nPos := 3, [color=#FF0000:32devp68]oGet1:Refresh(), oGet2:Refresh() [/color:32devp68]}
============================
Using a [color=#FF0000:32devp68]Valid[/color:32devp68] for the 1. get ( using Values for all Gets ) :
Shows a Red Box for the 3. Get, if the Value of the 3. Get > 100
REDEFINE GET oGET1 VAR nGET1 ID 250 OF oDlg UPDATE ;
VALID ( IIF( [color=#FF0000:32devp68]nGET3 > 100[/color:32devp68], ( [color=#FF0000:32devp68]nPos := 3[/color:32devp68], oGet1:Refresh(), oGet2:Refresh(), oGet3:Refresh() ), NIL ), .T. )
// TOP, LEFT, hDC, WIDTH, HEIGHT, PEN, COLOR
oGet1:bPainted := { |hDC| IIF( nPos = 1, ( DRAWBOX( 0, 0, hDC, oGet1:nWidth-5, oGet1:nHeight-5, 3, 128 ), ;
DRAWBOX( 0, 0, hDC, 0, 0, 0, 0) ), NIL) }
oGet1:bGotFocus := { |hDC| nPos := 1, oGet2:Refresh(), oGet3:Refresh() }
The VALID- results :
[img:32devp68]http://www.service-fivewin.de/pictures/getbox2jpg[/img:32devp68]
[img:32devp68]http://www.service-fivewin.de/pictures/getbox3jpg[/img:32devp68]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
It's my Round GET
<!-- m --><a class="postlink" href="http://www.4shared.com/file/jARehqP9/DefGet.html">http://www.4shared.com/file/jARehqP9/DefGet.html</a><!-- m -->
<!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
Maybe I don't understand the Question.
<[color=#FF0000:3cxz94ly][b:3cxz94ly]a[/b:3cxz94ly][/color:3cxz94ly][color=#4000FF:3cxz94ly]round[/color:3cxz94ly]> means just a Frame to me, <[color=#4000FF:3cxz94ly]Round[/color:3cxz94ly]> means a round Border ???
As well a Solution needed :
[color=#4000FF:3cxz94ly].... where I can revert to default (or remove it) when validation is ok.[/color:3cxz94ly]
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Border around GET
|
Sorry
|
Border around GET
|
I think that this solve your problem
nVar:=0
define dialog oDlg ....
redefine Get oGet Var nVar .... ON CHANGE validate( nVar, 100, oDlg )
function validate( nVar, nMax, oDialog )
if (nVar > nMax )
DRAWBOX....
else
oDialog:Refresh()
endif
return
return
|
Border around GET
|
Dear Guys,
Thank you Laiton!
Thank you Uwe.. Your a great help..
I will immediately adapt your idea.
My Best Regards,
Frances
|
Border around GET
|
A complete Solution ( modified )
3 Tests You can activate / deactivate
All Types are supported : C, N, L, D
1. Show Box on Get-Focus
2. Show Box on empty Values on Init
3. Show Box with valid Values on Init
[img:1aefupxd]http://www.service-fivewin.de/pictures/getbox4.jpg[/img:1aefupxd]
[code=fw:1aefupxd]<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;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oDlg, hDC<br /><span style="color: #00C800;">Local</span> oGet1,oGet2,oGet3,oGet4<br /><span style="color: #00C800;">local</span> cVar1 := <span style="color: #ff0000;">"Test"</span><br /><span style="color: #00C800;">local</span> nVar2 := <span style="color: #000000;">100</span><br /><span style="color: #00C800;">local</span> lVar3 := .F.<br /><span style="color: #00C800;">local</span> dVar4 := DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> oSay1, oSay2, oSay3, oSay4<br /><span style="color: #00C800;">local</span> cSay1 := <span style="color: #ff0000;">"Test"</span><br /><br /><span style="color: #00C800;">local</span> oGetFont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Arial"</span>, ,<span style="color: #000000;">-14</span>,.F.,.T. , , , ,.T. <span style="color: #000000;">)</span><br /><br />SET DATE GERMAN<br />SET CENTURY <span style="color: #0000ff;">ON</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">from</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing Boxes on GET"</span><br /><br />@ <span style="color: #000000;">15</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">get</span> oGet1 <span style="color: #0000ff;">var</span> cVar1 <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">FONT</span> oGetFont<br /><span style="color: #B900B9;">// on Lostfocus delete Box</span><br /><span style="color: #B900B9;">// -------------------------------</span><br />oGet1:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet1, hDC, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /><br />@ <span style="color: #000000;">40</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">get</span> oGet2 <span style="color: #0000ff;">var</span> nVar2 <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"99999"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">FONT</span> oGetFont<br />oGet2:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet2, hDC, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br />@ <span style="color: #000000;">65</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">get</span> oGet3 <span style="color: #0000ff;">var</span> lVar3 <span style="color: #0000ff;">size</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">FONT</span> oGetFont<br />oGet3:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet3, hDC, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br />@ <span style="color: #000000;">90</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">get</span> oGet4 <span style="color: #0000ff;">var</span> dVar4 <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"##.##.####"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">FONT</span> oGetFont<br />oGet4:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet4, hDC, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /><br /><span style="color: #B900B9;">// GETBOX( oGet, hDC, Getvar, Getcond, lValid, lEmpty, lStatus )</span><br /><span style="color: #B900B9;">// ----------------------------------------------------------------------------------</span><br /><span style="color: #B900B9;">// oGet</span><br /><span style="color: #B900B9;">// hDC</span><br /><span style="color: #B900B9;">// Getvar = Value</span><br /><span style="color: #B900B9;">// Getcond = Valid Value</span><br /><span style="color: #B900B9;">// lValid = Valid .T. or .F.</span><br /><span style="color: #B900B9;">// lEmpty = Empty .T. or .F.</span><br /><span style="color: #B900B9;">// lStatus = Show Box .T. or .F.</span><br /><br /><span style="color: #B900B9;">// Show Box on Get-Focus</span><br /><span style="color: #B900B9;">// GETBOX( oGet, hDC, Getvar, Getcond, lValid, lEmpty, lStatus )</span><br /><span style="color: #B900B9;">// ----------------------------------------------------------------------------------</span><br />oGet1:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet1, hDC, cVar1, <span style="color: #ff0000;">""</span>, .F., .F., .T. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br />oGet2:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet2, hDC, nVar2, <span style="color: #000000;">0</span>, .F., .F., .T. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br />oGet3:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet3, hDC, lVar3, .F., .F., .F., .T. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br />oGet4:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span>|hDC| GETBOX<span style="color: #000000;">(</span> oGet4, hDC, dVar4, DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .F., .F., .T. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /><br /><br /><span style="color: #B900B9;">// Draw Box for for all empty Values</span><br /><span style="color: #B900B9;">// GETBOX( oGet, hDC, Getvar, Getcond, lValid, lEmpty, lStatus )</span><br /><span style="color: #B900B9;">// ----------------------------------------------------------------------------------</span><br />*GETBOX<span style="color: #000000;">(</span> oGet1, hDC, cVar1, <span style="color: #ff0000;">""</span>, .F., .T., .T. <span style="color: #000000;">)</span><br />*GETBOX<span style="color: #000000;">(</span> oGet2, hDC, nVar2, <span style="color: #000000;">0</span>, .F., .T., .T. <span style="color: #000000;">)</span><br />*GETBOX<span style="color: #000000;">(</span> oGet3, hDC, lVar3, .F., .F., .T., .T. <span style="color: #000000;">)</span><br />*GETBOX<span style="color: #000000;">(</span> oGet4, hDC, dVar4, CTOD<span style="color: #000000;">(</span><span style="color: #ff0000;">" . . "</span><span style="color: #000000;">)</span>, .F., .T. <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #B900B9;">// Init Box with Valid-Test</span><br /><span style="color: #B900B9;">// GETBOX( oGet, hDC, Getvar, Getcond, lValid, lEmpty, lStatus )</span><br /><span style="color: #B900B9;">// -----------------------------------------------------------------------------------</span><br />*GETBOX<span style="color: #000000;">(</span> oGet1, hDC, cVar1, <span style="color: #ff0000;">"Test"</span>, .T., .F., .T. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// NO Box</span><br />*GETBOX<span style="color: #000000;">(</span> oGet2, hDC, nVar2, <span style="color: #000000;">200</span>, .T., .F., .T. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// SHOW Box</span><br />*GETBOX<span style="color: #000000;">(</span> oGet3, hDC, lVar3, .T., .T., .F., .T. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// SHOW Box</span><br />*GETBOX<span style="color: #000000;">(</span> oGet4, hDC, dVar4, DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T., .F., .T. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// NO Box</span><br /><br /><br />@ <span style="color: #000000;">7</span>, <span style="color: #000000;">9</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> CANCEL<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// --------- GET with Box --------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> GETBOX<span style="color: #000000;">(</span> oGet, hDC, Getvar, Getcond, lValid, lEmpty, lStatus <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> lStatus = .T.<br /> <span style="color: #00C800;">IF</span> <span style="color: #000000;">(</span> lEmpty = .T. .and. EMPTY<span style="color: #000000;">(</span>Getvar<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> .or. ;<br /> <span style="color: #000000;">(</span> lValid = .F. .and. lEmpty = .F. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Empty or Focus</span><br /> <span style="color: #B900B9;">// TOP, LEFT, hDC, WIDTH, HEIGHT, PEN, COLOR</span><br /> oGet:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> |hDC| DRAWBOX<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hDC, ;<br /> oGet:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-5</span>, oGet:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> VALTYPE <span style="color: #000000;">(</span> Getvar <span style="color: #000000;">)</span> = <span style="color: #ff0000;">"C"</span><br /> <span style="color: #B900B9;">// defined Valid</span><br /> <span style="color: #00C800;">IF</span> lValid = .T. .and. Getvar <> Getcond <br /> oGet:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> |hDC| DRAWBOX<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hDC, ;<br /> oGet:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-5</span>, oGet:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> <span style="color: #00C800;">ENDIF</span><br /> ELSEIF VALTYPE <span style="color: #000000;">(</span> Getvar <span style="color: #000000;">)</span> = <span style="color: #ff0000;">"N"</span><br /> <span style="color: #00C800;">IF</span> lValid = .T. .and. Getvar < Getcond <br /> oGet:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> |hDC| DRAWBOX<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hDC, ;<br /> oGet:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-5</span>, oGet:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> <span style="color: #00C800;">ENDIF</span><br /> ELSEIF VALTYPE <span style="color: #000000;">(</span> Getvar <span style="color: #000000;">)</span> = <span style="color: #ff0000;">"L"</span><br /> <span style="color: #00C800;">IF</span> lValid = .T. .and. Getvar <> Getcond <br /> oGet:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> |hDC| DRAWBOX<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hDC, ;<br /> oGet:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-5</span>, oGet:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> <span style="color: #00C800;">ENDIF</span><br /> ELSEIF VALTYPE <span style="color: #000000;">(</span> Getvar <span style="color: #000000;">)</span> = <span style="color: #ff0000;">"D"</span><br /> <span style="color: #00C800;">IF</span> lValid = .T. .and. Getvar <> Getcond <br /> oGet:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> |hDC| DRAWBOX<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hDC, ;<br /> oGet:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-5</span>, oGet:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ELSE</span><br /> oGet:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> |hDC| DRAWBOX<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// -------- DRAW BOX --------------------------------</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> DRAWBOX<span style="color: #000000;">(</span> nTOP, nLEFT, hDC, nLONG, nHIGHT, nPEN, nCOLOR <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">LOCAL</span> hPen := CREATEPEN<span style="color: #000000;">(</span> PS_SOLID, nPEN, nColor <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">LOCAL</span> hOldPen := SELECTOBJECT<span style="color: #000000;">(</span> hDC, hPen <span style="color: #000000;">)</span> <br /><br />MOVETO<span style="color: #000000;">(</span> hDC, nTOP, nLEFT <span style="color: #000000;">)</span><br />LINETO<span style="color: #000000;">(</span> hDC, nLong, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <br />LINETO<span style="color: #000000;">(</span> hDC, nLONG, nHIGHT <span style="color: #000000;">)</span> <br />LINETO<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, nHIGHT <span style="color: #000000;">)</span> <br />LINETO<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br />SELECTOBJECT<span style="color: #000000;">(</span> hDC, hOldPen <span style="color: #000000;">)</span> <br />DELETEOBJECT<span style="color: #000000;">(</span> hPen <span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1aefupxd]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
Dear Uwe,
Thank you so much for your kind and generous help.
Mabuhay!
Best Regards,
Frances
|
Border around GET
|
I tested still another Solution from Source
painting a BMP behind ( [color=#4000FF:1vbq7i8m]SAY[/color:1vbq7i8m] and [color=#FF0000:1vbq7i8m]GET[/color:1vbq7i8m] ) :
[img:1vbq7i8m]http://www.service-fivewin.de/pictures/border3.jpg[/img:1vbq7i8m]
A Gradient-Solution :
[img:1vbq7i8m]http://www.service-fivewin.de/pictures/border4.jpg[/img:1vbq7i8m]
[img:1vbq7i8m]http://www.service-fivewin.de/pictures/border5.jpg[/img:1vbq7i8m]
A special Border :
[img:1vbq7i8m]http://www.service-fivewin.de/pictures/border6.jpg[/img:1vbq7i8m]
Borders for SAY and GET calculated.
Say and Get must be placed before BMP :
@ 140,10 say oSay1 PROMPT "Row one" PIXEL FONT oGetFont
@ 138,5 BITMAP oBmp11 FILENAME "B_Blue2.bmp" ;
SIZE oSay1:nWidth + 10, oSay1:nHeight + 7 OF oDlg PIXEL ADJUST NOBORDER
@ 140, 100 GET oGet1 VAR cVar1 picture "@!" SIZE 50, 15 OF oDlg PIXEL FONT oGetFont
@ 138,95 BITMAP oBmp10 FILENAME "B_Red2.bmp" ;
SIZE oGet1:nWidth + 10, oGet1:nHeight + 7 OF oDlg PIXEL ADJUST NOBORDER
// Define the Border Start-Condition on Dialog-Init :
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( [color=#FF0000:1vbq7i8m]oBmp10:Hide(), oBmp11:Hide() [/color:1vbq7i8m])
Hide / Show Border on Button-Action :
[code=fw:1vbq7i8m]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// SAY with any Background-Bmp</span><br />@ <span style="color: #000000;">135</span>,<span style="color: #000000;">5</span> BITMAP oBmp11 FILENAME <span style="color: #ff0000;">"B_Blue1.bmp"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">68</span>, <span style="color: #000000;">24</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> NOBORDER<br />@ <span style="color: #000000;">140</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">say</span> oSay1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Row one"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oGetFont<br /><br /><span style="color: #B900B9;">// GET with any Background-Bmp</span><br />@ <span style="color: #000000;">135</span>,<span style="color: #000000;">95</span> BITMAP oBmp10 FILENAME <span style="color: #ff0000;">"B_Red1.bmp"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> NOBORDER<br />@ <span style="color: #000000;">140</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cVar1 <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oGetFont<br /><br /><br />@ <span style="color: #000000;">175</span>, <span style="color: #000000;">175</span> <span style="color: #0000ff;">BTNBMP</span> oBtn3 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span> ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span> , <span style="color: #000000;">30</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Border ON"</span> ;<br /><span style="color: #0000ff;">FONT</span> oGetFont ;<br /><span style="color: #0000ff;">LEFT</span> ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">"Tools.bmp"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>oBmp10:<span style="color: #000000;">Show</span>, oBmp11:<span style="color: #000000;">Show</span> <span style="color: #000000;">)</span> <br />oBtn3:<span style="color: #000000;">lTransparent</span> := .T.<br />oBtn3:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">" Desktop 1 "</span><br />oBtn3:<span style="color: #000000;">lBorder</span> := .F. <br /><br />@ <span style="color: #000000;">210</span>, <span style="color: #000000;">175</span> <span style="color: #0000ff;">BTNBMP</span> oBtn3 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span> ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span> , <span style="color: #000000;">30</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Border OFF"</span> ;<br /><span style="color: #0000ff;">FONT</span> oGetFont ;<br /><span style="color: #0000ff;">LEFT</span> ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">"Tools.bmp"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oBmp10:<span style="color: #000000;">Hide</span>, oBmp11:<span style="color: #000000;">Hide</span> <span style="color: #000000;">)</span> <br />oBtn3:<span style="color: #000000;">lTransparent</span> := .T.<br />oBtn3:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">" Desktop 1 "</span><br />oBtn3:<span style="color: #000000;">lBorder</span> := .F. <br /> </div>[/code:1vbq7i8m]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
Dear Uwe,
I tried with get multiline but it wont work.. How to do this with multiline get.. any idea?
[code=fw:18ujo9p7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> uDrawBoxOnGet<span style="color: #000000;">(</span> nTop, nLeft, hDC, nLong, nHeight, nPen, nColor, oGet <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> hPen,;<br /> hOldPen<br /> <br /> hPen := CreatePen<span style="color: #000000;">(</span> PS_SOLID, nPen, nColor <span style="color: #000000;">)</span><br /> hOldPen := SelectObject<span style="color: #000000;">(</span> hDC, hPen <span style="color: #000000;">)</span><br /> <br /> MoveTo<span style="color: #000000;">(</span> hDC, nTop, nLeft <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">TRY</span><br /> LineTo<span style="color: #000000;">(</span> hDC, nLong-<span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>oGet:<span style="color: #000000;">oBtn</span> == <span style="color: #00C800;">Nil</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">22</span><span style="color: #000000;">)</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> LineTo<span style="color: #000000;">(</span> hDC, nLong-<span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>oGet:<span style="color: #000000;">oBtn</span> == <span style="color: #00C800;">Nil</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">22</span><span style="color: #000000;">)</span>, nHeight <span style="color: #000000;">)</span><br /> CATCH<br /> LineTo<span style="color: #000000;">(</span> hDC, nLong, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//in-case the oGet:oBtn doesn't exist</span><br /> LineTo<span style="color: #000000;">(</span> hDC, nLong, nHeight <span style="color: #000000;">)</span><br /> END<br /> <br /> LineTo<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, nHeight <span style="color: #000000;">)</span><br /> LineTo<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldPen <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> hPen <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">RETURN</span><br /> </div>[/code:18ujo9p7]
Kind Regards,
Frances
|
Border around GET
|
Dear Mr. Uwe,
Any update on multiget border?
Kind Regards,
Frances
|
Border around GET
|
Hello Frances,
I tested, moving the Border to the Dialog ( not insided the Get ) in Relation to the Multiline-get-dimension.
It seems, it could be a Solution.
[img:nn5jhue5]http://www.service-fivewin.de/pictures/multiget.jpg[/img:nn5jhue5]
STATIC PROCEDURE Draw_Box(oDlg, oGet, nColor)
// x, y , nHigh, nWidht
// Top
DrawLine( [color=#FF0000:nn5jhue5]oDlg[/color:nn5jhue5], oGet:nTop - 5, oGet:nLeft - 5 , oGet:nTop - 5, oGet:nWidth + 32, 5, nColor )
// Bottom
DrawLine( [color=#FF0000:nn5jhue5]oDlg[/color:nn5jhue5], 125, oGet:nLeft - 5 , 125, oGet:nWidth + [color=#0000FF:nn5jhue5]32[/color:nn5jhue5], 5, nColor ) // [color=#0000FF:nn5jhue5]32 needed for Scrollbar[/color:nn5jhue5]
// Left
DrawLine( [color=#FF0000:nn5jhue5]oDlg[/color:nn5jhue5], oGet:nTop - 5, oGet:nTop - 5 , [color=#0000FF:nn5jhue5]125[/color:nn5jhue5], oGet:nLeft - 5, 5, nColor ) // [color=#0000FF:nn5jhue5]125 = Multiget-height[/color:nn5jhue5]
// Right
DrawLine( [color=#FF0000:nn5jhue5]oDlg[/color:nn5jhue5], oGet:nTop - 5, oGet:nWidth + 32 , 125, oGet:nWidth + 32, 5, nColor )
RETURN
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Border around GET
|
uwe,
can I create the border after I press button on one dialog to controll if there is a value or I can show the border of the get directly by pass valid control ?
sample :
if there is no customer name I cannot save the record and alI show the border of the gets must be no empty
|
Border around GET
|
Silvio,
I'm working on a nice Tool, to test everything at Runtime :
Dialog-Background and different Borderstyles like :
[color=#0000FF:lcfgft02]Border ( around )
Shadow ( Bottom / Right )
Underline [/color:lcfgft02]
Borders on any Control.
Blinking Borders on Valid, defined Border-distance from Control-outlines and much more.
Selections are saved to a INI-file.
Still the Color-selections for Focus / Lostfocus must be added.
[img:lcfgft02]http://www.service-fivewin.de/pictures/border8.jpg[/img:lcfgft02]
[img:lcfgft02]http://www.service-fivewin.de/pictures/border9.jpg[/img:lcfgft02]
[img:lcfgft02]http://www.service-fivewin.de/pictures/border10.jpg[/img:lcfgft02]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
The Border-painter is nearly finished.
Still the Sourceeditor must be included.
You can change the Brush, Focus- and Lostfocus-color at Runtime.
Changing the Borderstyle, Daniel's Restart-function is used.
All Settings are saved to a Ini-file.
[img:1h9jjrfg]http://www.service-fivewin.de/pictures/border11.jpg[/img:1h9jjrfg]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
can you make a little sample test with a only get ?
|
Border around GET
|
Uwe,
nice work, some years ago I try to do the same to show the focus, but how can this work with radio buttons and check buttons group ?, because the focus should be for all the group not for one of them only
regards
Marcelo
|
Border around GET
|
Marcelo,
the problem occurs as well with Multiline gets.
I use a fixed Height in case the Height cannot be calculated, to define the Area.
A bit testing is needed.
I will add Radios and Checkboxes to the Tool, to see how it works.
oGet1:bGotFocus := {|hDC| Draw_Box( oDlg, oGet1, nColorF, nSpace, nPen, [color=#FF0000:1gvz7c8w]130[/color:1gvz7c8w], nStyle, nShPos ) }
oGet1:bLostFocus := {|hDC| Draw_Box( oDlg, oGet1, nColorL, nSpace, nPen, [color=#FF0000:1gvz7c8w]130[/color:1gvz7c8w], nStyle, nShPos ) }
Focus on Checkbox
[img:1gvz7c8w]http://www.service-fivewin.de/pictures/border12.jpg[/img:1gvz7c8w]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
Dear Uwe,
Hi! Reviving this thread..
How to draw border around TTIMEPICK and TDATEPICK gets?
Kind regards,
|
Border around GET
|
Dear All,
It seems :bPainted of TTIMEPICK and TDATEPICK not working..?
Kind Regards,
|
Border around GET
|
Hello Frances,
did You have a look at the Samples Datetime.prg and Testdtp.prg ?
[img:2sz729js]http://www.service-fivewin.de/pictures/DTPick2.jg[/img:2sz729js]
[img:2sz729js]http://www.service-fivewin.de/pictures/DTPick1.jg[/img:2sz729js]
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Border around GET
|
Hi Mr. Uwe.
Could you please try something like this...
This style of this get looks very, very nice.
Redefine Get oGet Var MiVar ID 120 of oDlg [b:lhj4xwb4]When .F[/b:lhj4xwb4]. ....> This get is Disable (for the when .f.) but looks very nice)
Could be possible a get that look like this but [b:lhj4xwb4]Enable[/b:lhj4xwb4]?
Sorry for my bad English...
Best regards
Ruben Fernandez
|
Border around GET
|
Dear Uwe,
This is the Datepicker with the same :bPainted as Get object.. which does not display boders..
[img:66plo6bh]http://i208.photobucket.com/albums/bb82/fraxzi/DTPicker_zps09dce62d.png[/img:66plo6bh]
While :bGetFocus and :bLostFocus works as this image shows..
[img:66plo6bh]http://i208.photobucket.com/albums/bb82/fraxzi/DTPicker2_zps524201c2.png[/img:66plo6bh]
I would like a permanent borders as gets.. Just a simple purpose of visual aesthetics on my FWH apps..
|
Border around GET
|
Frances,
I added these two tests,
Is that the solution, You are looking for
Pensize, Color ( focus, lost ) and space can be defined .
[img:3m3xpzeo]http://www.service-fivewin.de/pictures/timedate1.jpg[/img:3m3xpzeo]
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Border around GET
|
Dear Uwe,
It has to be in ::bPainted
|
Border around GET
|
[color=#0000FF:1xeaafyj]Ruben,[/color:1xeaafyj]
do You mean a Border, or just changing the get-color itself ?
[b:1xeaafyj][color=#0000FF:1xeaafyj]Frances,[/color:1xeaafyj][/b:1xeaafyj]
I think it is not supported, tested but nothing happens.
From DTPICKER.CH :
[ <oDTPicker> := ] [color=#FF0000:1xeaafyj]TDatePick[/color:1xeaafyj]():ReDefine( <nId>, bSETGET(<uVar>),;
<oDlg>, <nHelpId>, <nClrFore>, <nClrBack>, <oFont>, <oCursor>,;
<cMsg>, <.update.>, <{uWhen}>, <{uValid}>,;
[\{|nKey, nFlags, Self| <uChange>\}], <pic> )
[ <oTMPicker> := ] [color=#FF0000:1xeaafyj]TTimePick[/color:1xeaafyj]():Redefine( <nId>, bSETGET(<uVar>),;
<oDlg>, <nHelpId>, <nClrFore>, <nClrBack>, <oFont>, <oCursor>,;
<cMsg>, <.update.>, <{uWhen}>, <{uValid}>,;
[\{|nKey, nFlags, Self| <uChange>\}] )
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Border around GET
|
Dear Uwe,
Yes it didn't fire-up the :bPainted.. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
But using :bLostFocus and :bGotFocus works but need to focus (by mouse) to TDatePick to draw borders..
If I use oDate:SetFocus() it didn't draw the border.
|
Border around GET
|
Frances
I added a Testbutton.
[color=#FF0000:2jczf39b]External SetFocus [/color:2jczf39b]works fine and draws the Border.
[color=#0000FF:2jczf39b]dDate := Date()
@ 70, 95 DTPICKER oDate VAR dDate SIZE 50, 12 FONT oGetFont OF oDlg PIXEL
oDate:bGotFocus := {|hDC| Draw_Box( oDlg, oDate, nColorF, nSpace, nPen, 0, nStyle, nShPos ) }
oDate:bLostFocus := {|hDC| Draw_Box(oDlg, oDate, nColorL, nSpace, nPen, 0, nStyle, nShPos ) }[/color:2jczf39b]
@ 170, 80 BTNBMP oBtn1 OF oDlg ;
SIZE 70, 25 PIXEL 2007 ;
NOBORDER ;
PROMPT "&Border " ;
FILENAME c_path + "\Bitmaps\Select.Bmp" ;
ACTION ([color=#FF0000:2jczf39b] oDate:SetFocus(), oDate:Refresh() [/color:2jczf39b]) ;
FONT oGetFont ;
LEFT
[img:2jczf39b]http://www.service-fivewin.de/pictures/border15.jpg[/img:2jczf39b]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
Dear Uwe,
I already did that.. but when redefine dialog was init.. the DatePicker has no border even if I put oDate:SetFocus() on dialog's init..
|
Border around GET
|
Frances,
I'm working on a Solution using [color=#FF0000:1859k541][b:1859k541]RESOURCES[/b:1859k541][/color:1859k541] !!!
Define Color- or brushed Border.
This Solution [color=#FF0000:1859k541]doesn't need Focus / Lostfocus[/color:1859k541] of a Object.
( but can be used as well )
Define a Borderchange on any Action and Object You like.
I think I will Update the Tool I created and it will work on Code and Resource.
Also there will be a Brush-support, not possible with the Solution I created before.
[img:1859k541]http://www.service-fivewin.de/pictures/border15.jpg[/img:1859k541]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
Dear Uwe,
Looking forward for the update. Thanks <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
Frances,
a extra Tool, only for Resources.
Realtime Tests of Colors and Brushes.
Get / Lost Focus and external color / brush - border-define is supported.
Download ( 1.3 MB ) :
<!-- m --><a class="postlink" href="http://www.service-fivewin.de/fw_downloads/resbord.zip">http://www.service-fivewin.de/fw_downloads/resbord.zip</a><!-- m -->
[img:1j12js88]http://www.service-fivewin.de/pictures/resbord1.jpg[/img:1j12js88]
[img:1j12js88]http://www.service-fivewin.de/pictures/resbord2.jpg[/img:1j12js88]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border around GET
|
Dear Uwe,
I downloaded and will test this weekend.. I will adapt and post feedback asap.
Thank you so much for the great efforts!
|
Border around GET
|
Frances
There will be still some more options.
Getting some funny effects, using a Gradient :
[img:1uy05eyi]http://www.service-fivewin.de/pictures/bgrad1.jg[/img:1uy05eyi]
[img:1uy05eyi]http://www.service-fivewin.de/pictures/bgrad2.jg[/img:1uy05eyi]
[img:1uy05eyi]http://www.service-fivewin.de/pictures/bgrad3.jg[/img:1uy05eyi]
Best Regards
Uwe <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
|
Border around GET
|
Master Uwe, would it be possible to make the download available again, please?
Regards, saludos.
|
Border around GET
|
All fixed ( images and download ) <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
[color=#FF0040:3fkktfcm][size=150:3fkktfcm]pflegeplus.com[/size:3fkktfcm][/color:3fkktfcm]
has changed to
[color=#008040:3fkktfcm][size=150:3fkktfcm]service-fivewin.de[/size:3fkktfcm][/color:3fkktfcm]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
[quote="ukoenig":t9wh9ork]All fixed ( images and download ) <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
[color=#FF0040:t9wh9ork][size=150:t9wh9ork]pflegeplus.com[/size:t9wh9ork][/color:t9wh9ork]
has changed to
[color=#008040:t9wh9ork][size=150:t9wh9ork]service-fivewin.de[/size:t9wh9ork][/color:t9wh9ork]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:t9wh9ork]
[url:t9wh9ork]http://service-fivewin.de/[/url:t9wh9ork]
Master Uwe, nothing is working. Is this correct? There is no douwnload area. thanks.
If it is not possible to send the download, there is no problem. Hugs.
Regards, saludos.
|
Border around GET
|
João,
The download-name still exists
just the DOMAIN-name changed
this is the complete link I posted
I'm just preparing a new release much better to handle <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
<!-- m --><a class="postlink" href="http://www.service-fivewin.de/fw_downloads/resbord.zip">http://www.service-fivewin.de/fw_downloads/resbord.zip</a><!-- m -->
with the new tool You caan design borders in realtime
with a new created border-function easy to use.
the related source ( functioncall with parameter ) will be visible in folderpage 2
The folderpage 3 shows the border-function
still the radios have to be included as well two color selections
one for the background and one for the border to check the contrast
any change of the radios is painting new borders.
[img:1ewzqqgf]http://www.service-fivewin.de/images/border8.jg[/img:1ewzqqgf]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
Great!! Super many thanks master. Regards, saludos.
|
Border around GET
|
Here is a preview of the new release ( looks much different )
many things are added like a detection of the needed textcolor
like contrast used in xBrowse
You can select a background and a wanted border-color,
a defined border-distance and much more like You can see on
the radioselection-area.
glowing borders with a defined distance from the object outline
[img:1fknz0am]http://www.service-fivewin.de/images/bordt1.jg[/img:1fknz0am]
the generated source-result
[img:1fknz0am]http://www.service-fivewin.de/images/bordt2.jg[/img:1fknz0am]
solid lines on a light background with no distance
[img:1fknz0am]http://www.service-fivewin.de/images/bordt3.jg[/img:1fknz0am]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
I completed the tool
don't forget to check the makefile. <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
Let me know if something doesn't work
After creating Your own sample don't forget to
use < refresh source > on folderpage 2 to generate the new sample <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
On folderpage 3 You can create the new exefile
<!-- m --><a class="postlink" href="http://www.service-fivewin.de/FW_Downloads/Newbord1.zip">http://www.service-fivewin.de/FW_Downloads/Newbord1.zip</a><!-- m -->
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
It's just spectacular. Very very good. Super grateful.
Es simplemente espectacular. Muy muy bien. Super agradecido.
Regards, saludos.
|
Border around GET
|
I found a small bug : a button double defined
now it is much better.
Because of using a folder, we can include much more
Release 2.2
<!-- m --><a class="postlink" href="http://www.service-fivewin.de/FW_Downloads/Newbord1.zip">http://www.service-fivewin.de/FW_Downloads/Newbord1.zip</a><!-- m -->
[img:3pzcigx5]http://www.service-fivewin.de/images/borders1.jg[/img:3pzcigx5]
a first test working with BMP-brushes
as well there must be a new radio-selection
to switch between color and BMP-brush
Because of the needed space I have to rearrange
everything a little bit changing the folderheight.
Maybe I have to add a different CONTRAST-calculation
scanning the brush.image or adding a textcolor-selection.
[img:3pzcigx5]http://www.service-fivewin.de/images/borders2.jg[/img:3pzcigx5]
The changes
[img:3pzcigx5]http://www.service-fivewin.de/images/borders3.jg[/img:3pzcigx5]
[size=150:3pzcigx5]FINISHED[/size:3pzcigx5] <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
[size=150:3pzcigx5]Now with BMP-brush and Textcolor-support[/size:3pzcigx5]
the download-link is the same
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around GET
|
preparing a new download
there are many new things added
for the background I added a gradient and image-support
a new gradient and button-designer
a image background-selector
Release 3.1
<!-- m --><a class="postlink" href="http://www.service-fivewin.de/FW_Downloads/Newbord1.zip">http://www.service-fivewin.de/FW_Downloads/Newbord1.zip</a><!-- m -->
[img:bh8fho2j]http://www.service-fivewin.de/images/brd5.jg[/img:bh8fho2j]
A gradient-designer with many options and button-design-support
after the design of a gradient is finished, just click one of the 4
radios to create the button.
Inside the button-page You can adjust the textcolor
the gradient-array is created to use it for window, dialogs or others
[img:bh8fho2j]http://www.service-fivewin.de/images/brd6.jg[/img:bh8fho2j]
the buttons can be created with the gradient-designer
the button-gradient is called with a function
Sample : button3 created ( after selection it jumps back to 0 )
As soon the buttondesign is finished Yo can save it to a INI
You can redesign the button and if needed restore the saved design
On restart the saved designes are loaded from the INI-file.
To save a design just click the created button.
[img:bh8fho2j]http://www.service-fivewin.de/images/brd10.jg[/img:bh8fho2j]
[img:bh8fho2j]http://www.service-fivewin.de/images/brd7.jg[/img:bh8fho2j]
[img:bh8fho2j]http://www.service-fivewin.de/images/brd9.jg[/img:bh8fho2j]
A new sample.prg with buttontest
[img:bh8fho2j]http://www.service-fivewin.de/images/brd8.jg[/img:bh8fho2j]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Border around SAY defined in Resource
|
Does anyone know how to draw a border around a SAY that is defined as a resource.
I am using BRW and the GETs that are defined as resources have a very neat flat blue border around them when displayed from FWH.
Is it possible to display the SAYs with the same flat blue border.
I have tried turning the border on for the resource in BRW (which translates to WS_BORDER in BRW) but when displayed from FWH there is indeed a border but it appears to be RECESSED or 3D and is not a flat blue line border (like the borders of the inputs of XHB Project Builder).
Also does anyone know the RGB colors used for the 'XP' BLUE BACKGROUND on the XHB Project Builder?
Regards,
Dale.
|
Border around SAY defined in Resource
|
As an alternative you can use a disabled GET instead of a SAY.
EMG
|
Border around SAY defined in Resource
|
Try to Draw lines and squares around it via oDlg:bPainted.
Use GetClientRect or something like this
|
Border around SAY defined in Resource
|
Dale,
[quote:24thllcn]I am using BRW and the GETs that are defined as resources have a very neat flat blue border around them when displayed from FWH.
Is it possible to display the SAYs with the same flat blue border.[/quote:24thllcn]
The problem is that if you do that, then the SAY looks just like a GET to the user. This would be confusing.
James
|
Border around focused line in browse?
|
Hello!
How to draw a box - border around
current/focused line in TWBrowse.
Thanks, Roman
|
Border around focused line in browse?
|
You can't.
|
Border around focused line in browse?
|
Roman, James,
Class TWBrowse Method Paint() can be easily modified to paint a dotted line or similar around the focused line.
|
Border around focused line in browse?
|
Antonio,
Well, easy for you probably, but I remember spending quite some time trying to get it working without success. I think part of the problem was that the cells are kind of still 3d from the old days. There are actually two lines around each cell. Maybe one is drawn in the background color. I don't remember exactly, but there were issues.
I'd be happy if someone proved me wrong.
James
|
Border around focused line in browse?
|
Hello!
I try to draw a box around the line and there are problems when I
move to the next line - the previous one is not redrawn correctly.
IMHO there is a (optimization) bug in static function WBrwLine (which is called from Paint method), because only left (gray) and bottom edge of each cell are redrawn:
[code:rfnt7dwz] case nLineStyle == LINES_GRAY
hPen = CreatePen( PS_SOLID, 1, CLR_GRAY )
hOld = SelectObject( hDC, hPen )
MoveTo( hDC, nLeft - 2, nTop - 2 )
LineTo( hDC, nLeft - 2, nBottom )
LineTo( hDC, nRight , nBottom )
SelectObject( hDC, hOld )
DeleteObject( hPen )
[/code:rfnt7dwz]
One solution is to create subclass of TWBrowse, copy WBrwLine and all methods which are calling WBrwLine (DrawLine, DrawSelect, Paint and LButtonDown) and then change WBrwLine to something like that:
[code:rfnt7dwz] case nLineStyle == LINES_GRAY
hPen = CreatePen( PS_SOLID, 1, CLR_GRAY )
hOld = SelectObject( hDC, hPen )
MoveTo( hDC, nLeft - 2, nTop - 1 )
LineTo( hDC, nLeft - 2, nBottom )
LineTo( hDC, nRight , nBottom )
MoveTo( hDC, nLeft - 2, nTop - 1 )
LineTo( hDC, nRight , nTop - 1 )
SelectObject( hDC, hOld )
DeleteObject( hPen )
hPen = CreatePen( PS_SOLID, 1, CLR_WHITE )
hOld = SelectObject( hDC, hPen )
MoveTo( hDC, nLeft - 1, nTop )
LineTo( hDC, nLeft - 1, nBottom )
SelectObject( hDC, hOld )
DeleteObject( hPen )[/code:rfnt7dwz]
The next step is to create function based on wBrwLine that draws frame around selected line, which is to be called after wBrwLine in DrawSelect method:
[code:rfnt7dwz]**************************************************************************
static function wBrwSimple( hWnd, hDC, nRowPos, aValues, aColSizes,;
nColPos, nClrText, nClrPane,;
hFont, lTree, aJustify, nPressed, nLineStyle,;
nColAct, lFocused, oVScroll, bLogicLen )
**************************************************************************
local nTxtHeight, hOldFont
local nColStart := -1
local nWidth := WndWidth( hWnd ) - If( oVScroll != nil .and. ;
Eval( bLogicLen ) > 1,;
GetSysMetrics( SM_CYHSCROLL ) + 3, 0 )
local nRow := nRowPos, nTop, nBottom, nLeft, nRight, n
local lReleaseDC := .f.
local nForeColor, nBackColor
local hPen, hOld, hBrush
DEFAULT lTree := .f.
if Empty( hDC )
hDC = GetDC( hWnd )
lReleaseDC = .t.
endif
hOldFont = SelectObject( hDC, hFont )
nTxtHeight = GetTextHeight( hWnd, hDC ) + 1
nTop = nTxtHeight * nRow
nBottom = nTop + nTxtHeight - 1
for n := nColPos to Len( aValues )
nLeft = nColStart + 1
nRight = Min( nColStart := ( nLeft + aColSizes[ n ] - 1 ), nWidth )
if nLeft > nWidth
exit
endif
if n == Len( aValues )
nRight = nWidth
endif
if lFocused
hPen = CreatePen( PS_SOLID, 1, CLR_BLACK )
hOld = SelectObject( hDC, hPen )
MoveTo( hDC, nLeft-1 , nBottom-1 )
LineTo( hDC, nRight, nBottom-1 )
MoveTo( hDC, nRight-1, nTop )
LineTo( hDC, nLeft-2 , nTop )
SelectObject( hDC, hOld )
DeleteObject( hPen )
else
hPen = CreatePen( PS_DOT, 1, CLR_BLACK )
hOld = SelectObject( hDC, hPen )
MoveTo( hDC, nLeft-1 , nBottom )
LineTo( hDC, nRight, nBottom )
MoveTo( hDC, nRight-1, nTop-1 )
LineTo( hDC, nLeft-2 , nTop-1 )
SelectObject( hDC, hOld )
DeleteObject( hPen )
endif
if nColPos > nWidth
exit
endif
next
return NIL // wBrwSimple
[/code:rfnt7dwz]
Here is the result: <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
[img:rfnt7dwz]http://www.astral-it.com/img/box1.png[/img:rfnt7dwz]
Regards, Roman
|
Border around focused line in browse?
|
Great, Roman!
EMG
|
Border around focused line in browse?
|
Good work Roman.
One question. Why a static function rather than a method?
James
|
Border around focused line in browse?
|
Hello!
Because that's the way how wBrwLine is implemented in WBROWSE.PRG and I just copied code from it.
BTW, I created three more "skins": <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
[img:9cosusgr]http://www.astral-it.com/img/box_cells.png[/img:9cosusgr]
[quote:9cosusgr][img:9cosusgr]http://www.astral-it.com/img/box_triangles.png[/img:9cosusgr][/quote:9cosusgr]
[img:9cosusgr]http://www.astral-it.com/img/box_fancy.png[/img:9cosusgr]
Cheers, Roman
|
Border around focused line in browse?
|
Roman,
Excellent <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Border de Get aundo tiene el WHEN .F.
|
Estimados, tego una consulta, en un dialogo muestro esto:
[img:15ialfq7]http://i.imgur.com/iGtrd4S.png[/img:15ialfq7]
[code=fw:15ialfq7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgE <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"DLG_USUARIOE"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ICON</span> GetIcon<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">FONT</span> oFontD ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_MYCELESTE2 TRANSPARENT<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> nNumUsua ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">WHEN</span> <span style="color: #00C800;">FALSE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> cNomUsua ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> cIdeUsua ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">VALID</span> Usuarios_ValidarIdentidad<span style="color: #000000;">(</span> lNuevo <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> cClaUsua ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlgE<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> nTipUsua ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">ITEMS</span> LOGIN_TYPEUSER<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oNomCiud <span style="color: #0000ff;">VAR</span> cNomCiud ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">WHEN</span> <span style="color: #00C800;">FALSE</span> ;<br /> <span style="color: #0000ff;">UPDATE</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">107</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">ACTION</span> Usuarios_SeleccionarCiudad<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> cNotUsua ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">108</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> MEMO<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> lActivo ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">WHEN</span> !lNuevo ;<br /> <span style="color: #0000ff;">UPDATE</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">CHECKBOX</span> lBloqueado ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">WHEN</span> <span style="color: #00C800;">FALSE</span> ;<br /> <span style="color: #0000ff;">UPDATE</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnDesbloquear ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">WHEN</span> !lNuevo .and. lBloqueado ;<br /> <span style="color: #0000ff;">ACTION</span> Usuarios_Desbloquear<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">WHEN</span> !Empty<span style="color: #000000;">(</span> cNomUsua <span style="color: #000000;">)</span> .and. !Empty<span style="color: #000000;">(</span> cIdeUsua <span style="color: #000000;">)</span> .and. !Empty<span style="color: #000000;">(</span> cClaUsua <span style="color: #000000;">)</span> .and. nTipUsua > <span style="color: #000000;">0</span> .and. nNumCiud > <span style="color: #000000;">0</span>;<br /> <span style="color: #0000ff;">ACTION</span> IIf<span style="color: #000000;">(</span> Usuarios_Grabar<span style="color: #000000;">(</span> lNuevo <span style="color: #000000;">)</span>, oDlgE:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> oDlgE ;<br /> <span style="color: #0000ff;">ACTION</span> oDlgE:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> CANCEL<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgE<br /><br /> </div>[/code:15ialfq7]
Donde algunos get estan desactivados y son mostrado con un color amarillo suave (:nClrPaneDis := CLR_SOFTYELLOW )
estos get tiene la clausula WHEN a False, para mostrarse desactivado, pero el caso es que estos get en particular muestran un borde een color gris muy suave y diferente al gris de los get activo.
por ejemplo lo deseable es que se muestre asi
[img:15ialfq7]http://i.imgur.com/bMAq9RQ.png[/img:15ialfq7]
alguien puede darme una pista, he visto el method paint del get pero no logro hacer un cambio que muestre lo que quiero.
muy agradecido, saludos
|
Border de Get aundo tiene el WHEN .F.
|
Carlos, intenta cambia aqui:
[code=fw:afcw480s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> CLASSDATA lDisColors <span style="color: #0000ff;">INIT</span> .T. <span style="color: #B900B9;">// Use standard disabled colors</span><br /> CLASSDATA lClrFocus <span style="color: #0000ff;">INIT</span> .F. <span style="color: #B900B9;">// change GET color when focused</span><br /> CLASSDATA nClrFocus <span style="color: #0000ff;">INIT</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">235</span>, <span style="color: #000000;">235</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// color to use when GET is focused and lClrFocus is .T.</span><br /> </div>[/code:afcw480s]
|
Border de Get aundo tiene el WHEN .F.
|
Carlos
Espero no te moleste este comentario.
No debes emplear la palabra Introdusca (Introduzca) en tus diálogos porque se sobre entiende que tenemos que introducir datos.
Podrías poner Nuevo usuario, Modifica usuario, etc.
Saludos,
Adhemar
|
Border en GET
|
Hola Foro, q tal las fiestas de Pascua. Espero q bien.
Al tema, tengo un GET que dependindo de un valor boolenao, debe estar activo o no. Esto es facil usando WHEN o o con Disable(), pero en ambos casos sigue visualizando el recuadro del GET. El GET esta definido desde recursos, veo que si fuera desde codigo existe NOBORDER, pero como puedo hacerlo para que cuando no se edite, tambien desaparezca el borde con el get definido en recursos. Evidentemente cuando deba editarse si quiero el borde, no me vale quitar el borde en el RC.
Gracias anticipadas.
|
Border en GET
|
A falta de respuestas, imagino que no puede hacerse. Entonces el planteamiento es el siguiente, el GET en el recurso sin caja. Y dibujar una caja alrededor del GET cuando proceda. Lo he intentado con WndBox(), pero no lo he conseguido, alguna idea.
Gracias.
|
Border en GET
|
asi a primeras miraste dos get superpuestos uno con caja y otro sin ella y ocultar el que no se desea ? ( o tambien un get y un say ) .
Atención ten en cuenta que se apilan en recursos al reves de como lo ves en el programa , de tal manera que si pones en recursos delante el say , te quedará detras al ejecutar .
No se si sirve pero ....
Saludso.
|
Border en GET
|
Gracias Jose Luis por la respuesta. Tus comentarios siempre son de ayuda.
Al final persevere con el tema de WndBox, y consegui que se comportase tal cual queria.
Es un get en el detalle de albaranes en el que se introduce el nº de lote para trazabilidat. Este Get depende de un buleano definido en un fichero de configuracion.
Al final lo hago así:
[code:1eym0qni] ...
REDEFINE GET oGetLot VAR DetVtaTmp->Lote ID 604 OF oDlg PICTURE "@K" VALID {|oGet|Ajusta(oGet)}
IF Cfg->Lotes //<====
REDEFINE SAY oSayLote PROMPT 'Lote' ID 4002 OF oDlg COLOR CLR_BLACK, CLR_WHITE
ELSE
oGetLot:Disable() //Podria hacerse en el WHEN del GET
ENDIF
//--
...
//-
ACTIVATE DIALOG oDlg ;
ON INIT IF(!SipInfo().AND.Cfg->lSip,ShowKeyboard(),NIL) ;
ON PAINT IF(Cfg->Lotes,WndBox(hDc,103,117,83,200),) //Dibujo box cuando Lotes .t.
...
[/code:1eym0qni]
|
Border en GET
|
Biel,
> Al final persevere con el tema de WndBox, y consegui que se comportase tal cual queria.
Bien. Otra solución sería cambiar el estilo del GET dinamicamente usando SetWindowLong( oGet:hWnd, GWL_STYLE, <estilo previo, excepto borde>).
El estilo previo se consigue llamando a GetWindowLong() de similar manera, y luego con un nAnd() seleccionar todo excepto el borde.
|
Border en GET
|
Lo probastes ?
|
Border en GET
|
Hola Antonio,
pues no, lo he dejado en tareas to do( to try), voy un poco retrasado, y ya me enrede mas de la cuenta. Cuando lo pruebe ya comentare en el hilo.
|
Border en GET
|
ok <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Border in BtnBMP from Resource with Transp. missing ?
|
Hello,
I created a test for all possible combination of class BTNBMP ( FWH 9.04 ).
It seems, the [color=#FF0000:17jr7rs2]Border[/color:17jr7rs2] for combination : Dialog / Buttons from resources / Transparent-mode is missing.
Creating the Buttons from Source and 2007-Style from Resource works.
If the complete Test is useful, I can add the source to the Post.
There are 8 Tests :
-----------------------
1. From Source transparent without Border
2. From Source transparent with Border
3. From Source 2007-Button-Style without Border
4. From Source 2007-Button-Style with Border
5. From Resource transparent without Border
6. From Resource transparent with Border
7. From Resource 2007-Button-Style without Border
8. From Resource 2007-Button-Style with Border
[img:17jr7rs2]http://www.pflegeplus.com/pictures/btnbmp2.jpg[/img:17jr7rs2]
[code=fw:17jr7rs2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> DLG_RES1<span style="color: #000000;">(</span> oWnd,oFont1, oFont2 <span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oBru,oDlg1, oBtn1, oBtn2, oBtn3, oBtn4, oBtn5, oBtn6, oBtn7, oSay<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILENAME <span style="color: #ff0000;">"../bitmaps/Backgrnd/marble6.bmp"</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Dialog1"</span> <span style="color: #0000ff;">of</span> oWnd <span style="color: #0000ff;">BRUSH</span> oBrush ;<br /><span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Buttons from Resource Transparent"</span> TRANSPARENT<br /><br /><span style="color: #B900B9;">// REDEFINE BTNBMP [<oBtn>] ;</span><br /><span style="color: #B900B9;">// [ ID <nId> ] ;</span><br /><span style="color: #B900B9;">// [ <bar: OF, BUTTONBAR > <oBar> ] ;</span><br /><span style="color: #B900B9;">// [ <resource: NAME, RESNAME, RESOURCE> <cResName1> ;</span><br /><span style="color: #B900B9;">// [,<cResName2>[,<cResName3>][,<cResName4>] ] ] ;</span><br /><span style="color: #B900B9;">// [ <file: FILE, FILENAME, DISK> <cBmpFile1> ;</span><br /><span style="color: #B900B9;">// [,<cBmpFile2>[,<cBmpFile3>[,<cBmpFile4>] ] ] ] ;</span><br /><span style="color: #B900B9;">// [ <action:ACTION,EXEC,ON CLICK> <uAction,...> ] ;</span><br /><span style="color: #B900B9;">// [ MESSAGE <cMsg> ] ;</span><br /><span style="color: #B900B9;">// [ <adjust: ADJUST > ] ;</span><br /><span style="color: #B900B9;">// [ WHEN <uWhen> ] ;</span><br /><span style="color: #B900B9;">// [ <lUpdate: UPDATE> ] ;</span><br /><span style="color: #B900B9;">// [ TOOLTIP <cToolTip> ] ;</span><br /><span style="color: #B900B9;">// [ PROMPT <cPrompt> ] ;</span><br /><span style="color: #B900B9;">// [ FONT <oFont> ] ;</span><br /><span style="color: #B900B9;">// [ <lNoBorder: NOBORDER> ] ;</span><br /><span style="color: #B900B9;">// [ <layout: CENTER, TOP, LEFT, BOTTOM, RIGHT> ] ;</span><br /><span style="color: #B900B9;">// [ <l2007: 2007> ] ; </span><br /><span style="color: #B900B9;">// [ <lTrans: TRANSPARENT> ] ; </span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/palm.bmp"</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"But.1"</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br /><span style="color: #0000ff;">RIGHT</span><br />oBtn1:<span style="color: #000000;">lTransparent</span> = .t. <br />oBtn1:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Button1"</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/visa.bmp"</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"But.2"</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br /><span style="color: #0000ff;">LEFT</span><br />oBtn2:<span style="color: #000000;">lTransparent</span> = .t.<br />oBtn2:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Button2"</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn3 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/pendrive.bmp"</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"But.3"</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br />TOP<br />oBtn3:<span style="color: #000000;">lTransparent</span> = .t.<br />oBtn3:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Button3"</span><br /><br /><span style="color: #B900B9;">// ------------ Missing BORDER !!!! with 2007 it works ------------</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn4 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/sound.bmp"</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"But.4"</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br />BOTTOM<br />oBtn4:<span style="color: #000000;">lTransparent</span> = .t. <br />oBtn4:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Button4"</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn5 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">210</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/printer.bmp"</span><br />oBtn5:<span style="color: #000000;">lTransparent</span> = .t. <br />oBtn5:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Button5"</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn6 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">220</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/ichat.bmp"</span><br />oBtn6:<span style="color: #000000;">lTransparent</span> = .t. <br />oBtn6:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Button6"</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">ID</span> <span style="color: #000000;">230</span> <span style="color: #0000ff;">VAR</span> <span style="color: #ff0000;">"Hello"</span> <span style="color: #0000ff;">FONT</span> oFont2 <br />oSay:<span style="color: #000000;">lTransparent</span> = .t. <br /><br /><span style="color: #B900B9;">// --------------</span><br /> <br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn7 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oDlg1 ;<br />FILENAME <span style="color: #ff0000;">"../bitmaps/alphabmp/video.bmp"</span> ;<br /><span style="color: #0000ff;">ACTION</span> oDlg1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oBtn7:<span style="color: #000000;">lTransparent</span> = .t. <br />oBtn7:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Exit"</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg1:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">530</span>, <span style="color: #000000;">460</span>, <span style="color: #000000;">320</span>, .f. <span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:17jr7rs2]
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border on checkbox
|
Hello,
I am using CHECKBOX with FOLDER; however when the CHECKBOX, there is no border to indicate to user the field is active; how do I correct this problem?
Thank You,
|
Border on checkbox
|
Darrell,
Are you using themes ?
1 24 "WindowsXP.Manifest"
|
Border on checkbox
|
Dear Antonio,
Yes, we are using themes.
|
Border on checkbox
|
Darrell,
Once the dialog is visible, the user has to press Alt in order to make the focus visible.
Here you have a working example:
[code:2rrqqvss]
#include "FiveWin.ch"
function Main()
local oDlg, oFld, lValue := .T.
DEFINE DIALOG oDlg SIZE 400, 300
@ 0.5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ;
PROMPTS "One", "Two", "Three"
@ 1, 1 CHECKBOX lValue OF oFld:aDialogs[ 1 ]
@ 3, 1 BUTTON "Test" OF oFld:aDialogs[ 1 ]
ACTIVATE DIALOG oDlg CENTERED
return nil
[/code:2rrqqvss]
[url=http://imageshack.us:2rrqqvss][img:2rrqqvss]http://img127.imageshack.us/img127/9253/capturefv7.png[/img:2rrqqvss][/url:2rrqqvss]
|
Border on checkbox
|
Anthonio,
Is there a solution available that does not require user to press ATL so border and button shortcuts are available? Users will complain if they have to press additional keys.
Thank You,
|
Border on checkbox
|
It's a Windows setting (look in the desktop properties).
EMG
|
Border on get browse
|
How I can have a border as this image ...on get date control ?
|
Border on get browse
|
Silvio, pode mostrar como fez:
[b:3546j031]+ 1 -[/b:3546j031]
no seu código prg?
|
Border on get browse
|
Please
do not claim the sources from me (it is already in two TOPICS that you give the SAME THING)
PLEASE SEE HERE
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=35626#p212105">viewtopic.php?f=3&t=35626#p212105</a><!-- l -->
If you search on forum you found it
|
Border on get browse
|
Thanks
|
BorderEdit Release 1.2 => DOWNLOAD
|
The Update Release of Borderedit 1.2
1. Selected Values added to created PRG-file
2. Checkbox added
Maybe it is possible, to reduce the Numbers of Calculations ( Border-function in Size ) ?
Just let me know.
[img:3r48oas5]http://www.pflegeplus.com/pictures/borderedit1.jpg[/img:3r48oas5]
Download ( 2.2 MB ) :
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/borderedit1.zip">http://www.pflegeplus.com/fw_downloads/borderedit1.zip</a><!-- m -->
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
BorderEdit Release 1.2 => DOWNLOAD
|
The Update of Borderedit Release 1.2
1. Selected Values added to created PRG-file
2. Checkbox added
[img:1nylconw]http://www.pflegeplus.com/pictures/borderedit2.jpg[/img:1nylconw]
[img:1nylconw]http://www.pflegeplus.com/pictures/borderedit3.jpg[/img:1nylconw]
Download ( 2.2 MB ) :
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/borderedit1.zip">http://www.pflegeplus.com/fw_downloads/borderedit1.zip</a><!-- m -->
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
BorderEdit Release 1.2 => DOWNLOAD
|
Dear Mr. Uwe,
This is a great work.. very useful.
With brushed dialog, :bLostfocus leaves marks and clear the brush (portion) around get/object..
Is there a way when :bLostFocus draws the original brush/color of the Dialog?
Kind Regards,
Frances
|
BorderEdit Release 1.2 => DOWNLOAD
|
Frances,
the next Update will have some new Functions :
[color=#0040FF:1cdbqlrg]1. Select / test any Dialog-background
2. A second LOSTFOCUS, to restore the original Background
3. The Step of Borderspaces is changed from 1, 2, 3 .. to 2, 4, 6, .....
4. It will be possible, to create a working EXE-file
5. A new Radio-border-function is included ( works different to normal Controls )[/color:1cdbqlrg]
but I still need some Time, because of other Work <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
[img:1cdbqlrg]http://www.pflegeplus.com/pictures/borderp2.jpg[/img:1cdbqlrg]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
BorderEdit Release 1.2 => DOWNLOAD
|
Dear Mr. Uwe,
Exciting news!
Kind Regards,
Frances
|
BorderEdit Release 1.2 => DOWNLOAD
|
Uwe,
Many thanks for this function!
Just a question:
is it correct to remove border in this way?
FUNCTION MAKESHADOW( nBorda , oDlg , oGet )
LOCAL nColor := GetSysColor( COLOR_BTNFACE )
IF nBorda = 1 // make the shadow
Draw_Box( oDlg, oGet, CLR_HRED, 1 , 3, 0 , 2 , 1 )
ELSE
// remove the shadow
Draw_Box( oDlg, oGet, nColor, 1 , 3, 0 , 2 , 1 )
ENDIF
marco
|
BorderEdit Release 1.2 => DOWNLOAD
|
Marco,
That doesn't work.
The Border-painting is designed, to work on any background.
I can do a oDialog:Refresh(), to restore the original Background,
but I prefer just to save / restore only the Background-area of the Control with Focus.
As well it would be nice, to define a transparent level of the Lines.
Working with Colors, You only need to select the Color of the Dialog for < Control > Lostfocus.
A Image-sample :
[img:2hqp01b1]http://www.pflegeplus.com/pictures/border13.jpg[/img:2hqp01b1]
A Gradient-sample :
[img:2hqp01b1]http://www.pflegeplus.com/pictures/border14.jpg[/img:2hqp01b1]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Border_UP_LEFT
|
HI
[code=fw:1wc5yhbw]<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;">"FileXLS.ch"</span> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XLSForm.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XLSError.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> BORDER_UP nOr<span style="color: #000000;">(</span> BORDER_TOP <span style="color: #000000;">)</span><br /><span style="color: #00D7D7;">#define</span> BORDER_DOWN nOr<span style="color: #000000;">(</span> BORDER_BOTTOM <span style="color: #000000;">)</span><br /><br />.....<br /> @ <span style="color: #000000;">4</span>,<span style="color: #000000;">1</span> XLS <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">OF</span> oXls BORDER BORDER_DOWN<br /></div>[/code:1wc5yhbw]
Instead of just BORDER_DOWN, how to make it BOEDER_LEFT_DOWN
Thanks
Regards
ACWoo
Using FHW1304+bcc582+Harbour
|
Bordes de xBrowse
|
Colegas, Estoy diseñando un dialogo desde recursos cuyo fondo es blanco. en él tengo un xbrowse también blanco pero algunas lineas del contorno no se dibujan. Adjunto imagen
[img:1dkr5rek]http://i66.tinypic.com/2pttsev.jpg[/img:1dkr5rek]
Utilizo Pelles-C como editor de recursos. Sé que variando el valor de WINDOW STYLES puedo obtener un contorno, pero este se ve 3D y no es esa mi intención. Alguna idea ?. Muchas gracias.
Saludos
|
Bordes de xBrowse
|
[quote="horacio":3kxcrhqd]Colegas, Estoy diseñando un dialogo desde recursos cuyo fondo es blanco. en él tengo un xbrowse también blanco pero algunas lineas del contorno no se dibujan. Adjunto imagen
[img:3kxcrhqd]http://i66.tinypic.com/2pttsev.jpg[/img:3kxcrhqd]
Utilizo Pelles-C como editor de recursos. Sé que variando el valor de WINDOW STYLES puedo obtener un contorno, pero este se ve 3D y no es esa mi intención. Alguna idea ?. Muchas gracias.
Saludos[/quote:3kxcrhqd]
El xBrowse es CUSTOM.? saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
|
Bordes de xBrowse
|
José Luis, gracias por responder. Si es Custom
Saludos
|
Bordes de xBrowse
|
When we create from source, the bottom-line also is drawn.
Wonder why the bottom-line is not drawn in the above case.
Any way, you may use oBrw:bPainted to draw the bottom-line yourself.
oBrw:bPainted := { |hDC, cPS, brw| yourfunction( hDC, cPC, brw ) }
|
Bordes de xBrowse
|
Thanks Rao, I worked perfectly
Saludos
|
Boris Pekic - NG's archive
|
"Dear friends,I hope these compiled messages will help...From 01.June.2000 to 30.September.2002.<!-- e --><a href="mailto:bpekic@eunet.yu">bpekic@eunet.yu</a><!-- e -->""Renewing time. Dedicated to all the friends around the world. This forum members shows that it doesn't matter where you are from, what is your skin color or what language are you speaking. The only thing that counts is friendship.I am happy I can help all of you friends, to make your life much easier, searching the archive. See you next year, cheers! Regards from Belgrade, Yugoslavia"<!-- m --><a class="postlink" href="http://fivewin.info/html/ng_archive.php">http://fivewin.info/html/ng_archive.php</a><!-- m -->
|
Boris Pekic - NG's archive
|
32-bit operations-------------------------------------------------------------------------------- Has anyone had any luck in writing 32 bit entries to the registry ? If so, could you please post a working sample ? Look in to this \source\classes\Reg32.prg source code. You will get the idea of how to proceed with it.Eg.:#Define HKEY_CURRENT_USER 2147483649oReg := TReg32():New( HKEY_CURRENT_USER, "\Software\iCode" )IF oReg:nError == 0nOrd := oReg:Get("Order", 0)IF oReg:nError == 0nOrder := if( nOrd == -1, nOrder, nOrd)ENDIFoReg:Close()ENDIF It not work on Fwin++1.2, only on Fwin2.0-------------------------------------------------------------------------------- How can i get cGetFile in 32 bits Here's the working V2. There is c code at the bottom that must be put in a 32bit dll. You can now get long filenames. ( V2.PRG ). you don't get an error message if no file is selected (cancel). ccepts a mask, default directory and caption for the file selection dialog.It could be expanded but it is the basic model and I've also included a cGetFile() function which can be linked into your code where your existing code using cGetFile() should work.Here's the ( LFN.ZIP ). It will contain the LFN.DLL for the cGetFile V2 posted above. You'll have to change the code in the V2.PRG to use LFN.DLL instead of MYDll.Dll ... You should be warned that using the LFN file get routine has a side effect. You have to remove the Null - Chr(0) - that is returned at the end of the filename.If you don't and take the Right( alltrim(cFile), 3 ) for the file returned you will only get the last 2 characters AND a Null and not the filename extension you expect. ( LFNDIR.ZIP )-------------------------------------------------------------------------------- I am having a stupid problem with Crystal 32bits. I can call from 'CRPE32.DLL' the function PEOpenEngine' from one application as many time as I like, but if I have to run another application and open the Crystal report engine again with 'PEOpenEngine' it fails and of course I can't do anything more with crystal. If I comment out the call to 'PEOpenEngine' and then try to start report is shows a message that the report engine is not opened, but in the same moment from the first app I can run as many reports as I need. Has somebody noticed something ugly like this. I ran a test program that looks something likeMain(cReport)Local oCRW := CrystalReport():New()oCrw:OpenReport( cReport,,.f.)? "Ready"OCrw:RunReport()oCRW:CloseReport()oCRW:Close()RETURN NILI can run this once no problem. If I run another copy (copy the EXE) I get the following error KERNEL32.DLLCannot run multiple instances of a DLL under WIN32s. Don't know if it is possilbe to have two separate applications accessing the same 32 bit DLL? I just gave a quick look today at your problem and maybe it isn't as serious as it may seem.I did open to FW apps that use CR and launched a report in each of them. In the second one I do get the error mesage you say, but the CR errror number is 0. What I suspect is that it isn't really an error because I just changed the code to to return .T. (ie ! ::lError) is initialy ::lError is TRUE but a call to PEGetErrorCode() returns 0. So I was able to present the report in the second app without any more warinings or false messages. How did you do that. Absolutely the same way as you describe I can reset the return value of ::lError so the program can continue but as soon as I run the report all the messages for 'Report Engine not Open' are coming and I cannot get the report on the screen. Would you send me your sample code so I can test it here. I will send you my sample just now.Yes CRW v.6 32 bit works perfect. It looks very nice with the drill down, search in the report and so on. Even the old reports from CRW v.4 work fine. No more problems with the printers because the 16 bits drivers. When I am done with the latest functions in Tom's TCRW class I will post it here.-------------------------------------------------------------------------------- Where can I find about Win32 API or DLL32 functions? Richard, Tehre are so many sources to find Win32 API function. You could use the Windows Api Viewer that comes with various Microsoft development tools (Like Visual Basic. for example). <!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/psdk/portals/win32start_1n6t.htm">http://msdn.microsoft.com/library/psdk/ ... t_1n6t.htm</a><!-- m --> <!-- w --><a class="postlink" href="http://www.vbapi.com">www.vbapi.com</a><!-- w --> although the source code examples are for VB, you can easily convert them toDLL32 calls-------------------------------------------------------------------------------- I'm really screw up with this one ! I want to use the function Peekmessage from USER32.DLL This is the MSN Info:PeekMessageBOOL PeekMessage(LPMSG lpMsg <>, // pointer to structure for messageHWND hWnd <>, // handle to windowUINT wMsgFilterMin <>, // first messageUINT wMsgFilterMax <>, // last messageUINT wRemoveMsg <> // removal flags);typedef struct tagMSG { HWND hwnd; UINT message;WPARAM wParam; LPARAM lParam;DWORD time; POINT pt;} MSG;End MSN INFOI translate it this way with FIvewin:STRUCt OstructMember Hwnd AS LONGMember Uint AS _INTMember Wparam AS DWORDMember Lparam AS LONGMember Time AS LONGMember Point AS LONGENDSTRUCtDLL32 FUNCTION Peekit( Lpmsg AS PTR, Hwnd AS LONG, Mfirst AS _INT, Mlast AS _INT, Mrem AS _INT ) AS BOOL PASCAL ;FROM "PeekMessageA" LIB "USER32.DLL" I call the Function this way Peekit(Ostruct,GetdesktopWindow(),522,522,0) I always received a GPF and Drwatson says that I acces memory improperly ! Where is my mistake ?? Any help or Idea will be appreciated ! I've found that with 32bit dll's you should use LONG instead of _INT when creating your DLL32 Functions. I've also found that returning _INT instead of a BOOL works better (so you just test the return against 0=FALSE or 1=TRUE). ie:DLL32 FUNCTION Peekit( Lpmsg AS PTR, Hwnd AS LONG, Mfirst AS LONG, Mlast AS LONG, Mrem AS LONG ) AS _INT PASCAL ;FROM "PeekMessageA" LIB "USER32.DLL" Thank 's for the information I'll give it a try this week and let you now how it goes ! What I ant to do it's to add MOUSE_WHEEL event to 16 bits application ! Sound cool. Let us know when you have it working.It's working thank you for all the information you gave me !I can now trap the WM_MOUSEWHEEL message but the problem is that I have to useDLL32 GetmessageA to retrieve it because with PeekMessageA I can't chatch it BEFOREthe default WNDPROC of Fivewin !But it's working, I sent a message to Antonio, to see if he can change the default process for queue message just adding a call to peekMessageA to retrieve the Wparam to get the wheel Rotation !If I was able to catch all message BEFORE Fivewin do it I can gave support for WM_MOUSEWHEEL event to Fivewin user ! Without testing, I did notice a few things. Any time Windows sends back data, whether it's LPSTR, PTR or otherwise, you need to proceeed the parameter with @. Also, try using LPSTR for the structure that Windows is returning. Generally, you are only using PTR when numers are returned. In this case, Windows is essentially returning the cBuffer of the structure to you. And finally, try using LONG where UINT's are concerned. Using _INT is Okay for 16-Bit DLL's but not for 32-Bit (called from a 16-Bit application that is).DLL32 FUNCTION Peekit( @Lpmsg AS LPSTR, Hwnd AS LONG, Mfirst AS LONG, Mlast AS LONG, Mrem AS LONG ) AS BOOL PASCAL ;FROM "PeekMessageA" LIB "USER32.DLL"It still may not work, but I would start with the things mentioned above. If you are still having problems, let me know and I will do some testing. Oh, and one other thing call the function this way:cBuffer := Ostruct:cBufferPeekit( @cBuffer, GetdesktopWindow(), 522, 522, 0 )// Validation EtcOstruct:cBuffer := cBufferThank's for all the information you gave me, MY Win32 API problem goes away with the detailed information you give me !-------------------------------------------------------------------------------- 32-bit Parse Script:small bug fixed for error 'Cannot Read Beyond End of File' - now setup is an installable exe - converts ASCII text to a variety of formats ( ACCESS, Excel, XML, HTML, dBASE ) - freeware<!-- m --><a class="postlink" href="http://www.mindspring.com/~stanl/D2001.htm">http://www.mindspring.com/~stanl/D2001.htm</a><!-- m -->, then click on <More...>, and then click on <Download>.-------------------------------------------------------------------------------- I need to use function GET_FLAG that is in CALC32.DLL (32 Bits) as I make to declare it?int Get_Flag( short int * FlagFiscal ) DLL32 FUNCTION GET_FLAG( nFlagFiscal AS PTR ) ;AS LONG PASCAL FROM "Get_Flag" LIB "calc32.dll"Debtor for the aid, but did not function. When I call the functioncontinues closing the program.What more I can make?--------------------------------------------------------------------------------Debtor for the aid, but did not function. When I call the function continues closing the program.What more I can make? do you have access to the source code for the CALC32.DLL? What is the Get_Flag( ) function supposed to do? Does it run in 16bit? Reason I ask. There seems to be a bug in the 32bit DLL function. I have a program I need 32bit DLL action; unfortunately, it only works in 16bit. Antonio is aware of the problem.The problem is alone with functions that receive parameters from the type shorts int? In these cases it is only giving error.Use Fw2.2+Clipper 5.e + Blinker 5.1I do not have access to the sources, and this function returns flag from a fiscal printer.Already I perceived that the problem is occurring with all the functions of the DLL that wait a parameter of the type short int.prototipoint Get_Flag( short int * FlagFiscal )Already I tried to declare it the following forms of declaration and nothing.DLL32 FUNCTION GET_FLAG( nFlagFiscal AS PTR ) ;AS LONG PASCAL FROM "Get_Flag" LIB "calc32.dll"DLL32 FUNCTION GET_FLAG( nFlagFiscal AS _INT ) ;AS LONG PASCAL FROM "Get_Flag" LIB "calc32.dll"DLL32 FUNCTION GET_FLAG( nFlagFiscal AS BYTE ) ;AS LONG PASCAL FROM "Get_Flag" LIB "calc32.dll"You can help me? it seems that the 32bit thunk that Fivewin does is deficient as far as that type of pointer. Fivetech would have to fix their 32bit thunking in order to fix this problem.Basically what would be required is to create a short int equivalent on the 16bit c side, convert it to a 32bit short int and then pass a pointer of iton the stack when calling / thunking the 32bit function.Maybe Vilian could try withDLL32 FUNCTION GET_FLAG( cFlagFiscal AS LPSTR ) ;AS LONG PASCAL FROM "Get_Flag" LIB "calc32.dll"and then convert cFlagFiscal to nFlagFiscal using BIN2I() function.FiveWin simply uses the Windows standard thunking system that does all thatautomatically <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Maybe, the problem comes from the way the function is getting called.I guess something like this may be needed:local nFlagFiscal := 0MsgInfo( Get_Flag( @nFlagFiscal ) )MsgInfo( nFlagFiscal )...DLL32 FUNCTION GET_FLAG( @nFlagFiscal AS PTR ) ;AS LONG PASCAL FROM "Get_Flag" LIB "calc32.dll"Notice the use of "@"Thanks, it´s ok.-------------------------------------------------------------------------------- See the sample bellow in VisualBasilPublic Declare Function Bematech_FI_VendeItem Lib "BemaFi32.dll" (ByVal Codigo As String, ByVal Descricao As String, ByValAliquota As String, ByVal TipoQuantidade As String, ByVal Quantidade As String, ByVal CasasDecimais As Integer, ByValValorUnitario As String, ByVal TipoDesconto As String, ByVal Desconto As String) As IntegerRetorno = Bematech_FI_VendeItem("1", "Caneta", "II", "I", "10", 2, "0,25", "%", "0000")It´s OkThe same sample in FiveWin 2.2c don´t work.DLL32 FUNCTION BmVendItem( Codigo AS LPSTR, Descricao AS LPSTR, Aliquota AS LPSTR, TpQte AS LPSTR,;Quantid AS LPSTR, Decimal AS PTR , ValUnit AS LPSTR , TpDesc AS LPSTR,; ValDesc AS LPSTR ) ;AS LONG PASCAL FROM "Bematech_FI_VendeItem" LIB "BemaFi32.dll"Retorno = BmVendItem("1", "Caneta", "II", "I", "10", 2, "0,25", "%", "0000")ORLOCAL cVar01 := "1", cVar02 := "Caneta",cVar03 := "II",cVar04 := "I",cVar05 := "10",nVal := 2,;cVar06 := "0,25",cVar07 := "%",cVar08 := "0000"Retorno := BmVendItem(cVar01,cVar02,cVar03,cVar04,cVar05,nVal,cVar06, cVar07, cVar08)OR DLL32 FUNCTION BmVendItem( Codigo AS STRING, Descricao AS STRING, Aliquota AS STRING, TpQte AS STRING,;Quantid AS STRING, Decimal AS PTR , ValUnit AS STRING , TpDesc AS STRING,; ValDesc AS STRING ) ;AS LONG PASCAL FROM "Bematech_FI_VendeItem" LIB "BemaFi32.dll"Retorno = BmVendItem("1", "Caneta", "II", "I", "10", 2, "0,25", "%", "0000")ORLOCAL cVar01 := "1", cVar02 := "Caneta",cVar03 := "II",cVar04 := "I",cVar05 := "10",nVal := 2,;cVar06 := "0,25",cVar07 := "%",cVar08 := "0000"Retorno := BmVendItem(cVar01,cVar02,cVar03,cVar04,cVar05,nVal,cVar06, cVar07, cVar08)What more I can make? Decimal must be of LONG type not PTR.Thanks, It´s ok.--------------------------------------------------------------------------------
|
Boris Pekic - NG's archive
|
3D Studio and FiveWin-------------------------------------------------------------------------------- I wonder if a VBX or DLL to manage 3DStudio files exist. Can anybody help me ? Check <!-- w --><a class="postlink" href="http://www.dbcad.com">www.dbcad.com</a><!-- w --> They release DLL and ActiveX Controls.... dbcad can read dwg files, so all you have to do is to save 3dstudio files as dwg--------------------------------------------------------------------------------
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.