topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
oTree | If I have object oTree
and I use a listbox to insert the oTree
oLbxTree:SetTree( oTree )
How I can make to found the nlevel for this obxTree
I 'm converting a oldest fw /clipper app where I used
nLevel:= oLbxTree:cargo:nLevel
but now with fwh this not run !!!
I have this BuildTree :
[code=fw:2749whoc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> BuildTree<span style="color: #000000;">(</span> oTree, oLbxTree <span style="color: #000000;">)</span><br /><br /> oTree:= TreeBegin<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Folder1"</span>,<span style="color: #ff0000;">"Folder2"</span>,<span style="color: #ff0000;">"Folder3"</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> ! PROVVE-><span style="color: #000000;">(</span>Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> _TreeItem <span style="color: #000000;">(</span>AllTrim <span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"."</span>+PROVVE->DENSOC, <span style="color: #ff0000;">"DBFs"</span>,,,, .F.<span style="color: #000000;">)</span><br /> TreeBegin<span style="color: #000000;">(</span>,<span style="color: #000000;">)</span><br /> PROVVE-><span style="color: #000000;">(</span>dbSkip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> LEN<span style="color: #000000;">(</span>AllTrim<span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span><span style="color: #000000;">)</span> == <span style="color: #000000;">2</span> .AND. ! PROVVE-><span style="color: #000000;">(</span>Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> _TreeItem <span style="color: #000000;">(</span>AllTrim <span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"."</span>+PROVVE->DENSOC, <span style="color: #ff0000;">"DBFs"</span>,,,, .F.<span style="color: #000000;">)</span><br /> *_TreeItem <span style="color: #000000;">(</span>PROVVE->DENSOC, <span style="color: #ff0000;">"DBFs"</span>,,,, .F.<span style="color: #000000;">)</span><br /> TreeBegin<span style="color: #000000;">(</span>, <span style="color: #000000;">)</span><br /> PROVVE-><span style="color: #000000;">(</span>dbSkip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> LEN<span style="color: #000000;">(</span>AllTrim<span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span><span style="color: #000000;">)</span> == <span style="color: #000000;">3</span> .AND. ! PROVVE-><span style="color: #000000;">(</span>Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> _TreeItem <span style="color: #000000;">(</span>AllTrim <span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"."</span>+PROVVE->DENSOC, <span style="color: #ff0000;">"LIB"</span>,,,, .F.<span style="color: #000000;">)</span><br /> *_TreeItem <span style="color: #000000;">(</span>PROVVE->DENSOC, <span style="color: #ff0000;">"LIB"</span>,,,, .F.<span style="color: #000000;">)</span><br /> TreeBegin<span style="color: #000000;">(</span>, <span style="color: #000000;">)</span><br /> PROVVE-><span style="color: #000000;">(</span>dbSkip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> LEN<span style="color: #000000;">(</span>AllTrim<span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span><span style="color: #000000;">)</span> >= <span style="color: #000000;">4</span> .AND. ! PROVVE-><span style="color: #000000;">(</span>Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> * <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">(</span>AllTrim<span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span><span style="color: #000000;">)</span> >= <span style="color: #000000;">4</span><br /> _TreeItem <span style="color: #000000;">(</span>AllTrim <span style="color: #000000;">(</span>PROVVE->CODAZI<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"."</span>+PROVVE->DENSOC, <span style="color: #ff0000;">"LOB"</span>,,,, .F.<span style="color: #000000;">)</span><br /> *_TreeItem <span style="color: #000000;">(</span>PROVVE->DENSOC, <span style="color: #ff0000;">"LOB"</span>,,,, .F.<span style="color: #000000;">)</span><br /> * <span style="color: #00C800;">ENDIF</span><br /><br /> PROVVE-><span style="color: #000000;">(</span>dbSkip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ENDDO</span><br /> TreeEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /> TreeEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /> TreeEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /> TreeEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> oTree:<span style="color: #000000;">Expand</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oLbxTree:<span style="color: #000000;">SetTree</span><span style="color: #000000;">(</span> oTree <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /> </div>[/code:2749whoc]
how I can to converte it on Xbrowse ? |
oTree cambiar un item | Hola.
Quiero poder cambiar "en el mismo lugar" el nombre de un item de un oTree y no tener que hacer un dialogo donde le pido al usuario que ingrese el nuevo nombre.
Como lo hago?
Gracias. |
oTree como dejo el fondo transparente | Como dejo el fonde transparente del Otree segun el codigo, tambien necesito colocar una trama es decir una linea de un color y otra diferente.
Gracias
[code=fw:2oi0xqb0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDtree <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"TREE"</span> <br /><span style="color: #B900B9;">// par_diag(oDtree,3,1,1) //(oDlgxx,nbrush,ncolor,ndisp) //ndisp no se esta usando</span><br /> oImageList = TImageList<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>,TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"PRINTER"</span>,, oDtree <span style="color: #000000;">)</span>,;<br /> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> oImageList:<span style="color: #000000;">AddMasked</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OK"</span>,, oDtree <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> oTree := TTreeView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> <span style="color: #000000;">100</span>,oDtree,<span style="color: #000000;">0</span>,GetSysColor<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>, .T. ,<span style="color: #ff0000;">"ll"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//ver ttreevie.prg en classes</span><br /><span style="color: #B900B9;">// METHOD ReDefine( nId, oWnd, nClrFore, nClrBack, lDesign, cMsg ) CONSTRUCTOR</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">611</span> <span style="color: #0000ff;">OF</span> oDtree <span style="color: #0000ff;">ACTION</span> oDtree:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:2oi0xqb0] |
oTree for xBrowse sample... | Hi!Anybody with working sample using Tree for xBrowse for DBFCDX table....Best Regards,Frances |
oTree for xBrowse sample... | Did you try the \FWH\Samples\TestXbr3.PrgCheck menu Tree Browse.RegardsAnser |
oTree for xBrowse sample... | Yes I tried but I cant work it by (alias)->field....I dont use ADO.Regards |
oTree for xBrowse sample... | Anyone? |
oTree for xBrowse sample... | Frances,You can use the source code for MakeTree() in samples\TestXbr3.prgJust use the DBF instead of an ADO recordset. The source code is almost the same. |
oTree for xBrowse sample... | [quote="Antonio Linares":3jguvhea]Frances,
You can use the source code for MakeTree() in samples\TestXbr3.prg
Just use the DBF instead of an ADO recordset. The source code is almost the same.[/quote:3jguvhea]Antonio,i'm also very interested in a sample how to use this tree browse with dbf files.Unfortunatelly it's not so easy to find a replacement for the 'union' clause of a sql query.Could you please provide a pure dbf sample for this useful feature or give us some tips?This woulds be great.Thanks and regards,Detlef |
oTree for xBrowse sample... | Frances, Detlef,Here you have a working example:[code:1zsmnk5u]
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oWnd, oBrw
USE Customer
INDEX ON Field->State TO State
SET ORDER TO "State"
GO TOP
DEFINE WINDOW oWnd TITLE "DbfTree"
@ 0, 0 XBROWSE oBrw OF oWnd LINES CELL
oBrw:SetTree( BuildTree() )
oBrw:CreateFromCode()
oBrw:aCols[ 1 ]:cHeader = "State"
oWnd:oClient = oBrw
ACTIVATE WINDOW oWnd
return nil
static function BuildTree()
local oTree, cState
TREE oTree
while ! Eof()
if Empty( cState )
_TreeItem( Customer->State ):Cargo := RecNo()
TREE
cState = Customer->State
else
if cState != Customer->State
ENDTREE
cState = Customer->State
_TreeItem( Customer->State ):Cargo := RecNo()
TREE
endif
endif
if Customer->State == cState
_TreeItem( Customer->City ):Cargo := RecNo()
endif
SKIP
enddo
ENDTREE
ENDTREE
GO TOP
return oTree
[/code:1zsmnk5u] |
oTree for xBrowse sample... | [url=http://imageshack.us:18vuu5nz][img:18vuu5nz]http://img88.imageshack.us/img88/9205/xbrtreeeq6.jpg[/img:18vuu5nz][/url:18vuu5nz] |
oTree for xBrowse sample... | Antonio,this is working great! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Many thanks for the sample,Detlef |
oTree for xBrowse sample... | Using bitmaps in the tree:Test.prg[code:fox9mk1r]
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oWnd, oBrw
USE Customer
INDEX ON Field->State TO State
SET ORDER TO "State"
GO TOP
DEFINE WINDOW oWnd TITLE "DbfTree"
@ 0, 0 XBROWSE oBrw OF oWnd LINES CELL
oBrw:SetTree( BuildTree(), { "open", "close", "go" } )
oBrw:CreateFromCode()
oBrw:aCols[ 1 ]:cHeader = "State"
oWnd:oClient = oBrw
ACTIVATE WINDOW oWnd
return nil
static function BuildTree()
local oTree, cState
TREE oTree
while ! Eof()
if Empty( cState )
_TreeItem( Customer->State ):Cargo := RecNo()
TREE
cState = Customer->State
else
if cState != Customer->State
ENDTREE
cState = Customer->State
_TreeItem( Customer->State ):Cargo := RecNo()
TREE
endif
endif
if Customer->State == cState
_TreeItem( Customer->City ):Cargo := RecNo()
endif
SKIP
enddo
ENDTREE
ENDTREE
GO TOP
return oTree
[/code:fox9mk1r]
Test.rc
[code:fox9mk1r]
open BITMAP "c:\fwh\bitmaps\16x16\folder2.bmp"
close BITMAP "c:\fwh\bitmaps\16x16\folder.bmp"
go BITMAP "c:\fwh\bitmaps\16x16\go.bmp"
[/code:fox9mk1r][url=http://imageshack.us:fox9mk1r][img:fox9mk1r]http://img357.imageshack.us/img357/6436/tree2ak5.jpg[/img:fox9mk1r][/url:fox9mk1r] |
oTree for xBrowse sample... | With multiple columns:test.prg[code:puy0br0g]
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oWnd, oBrw
USE Customer
INDEX ON Field->State TO State
SET ORDER TO "State"
GO TOP
DEFINE WINDOW oWnd TITLE "DbfTree"
@ 0, 0 XBROWSE oBrw OF oWnd LINES CELL
oBrw:SetTree( BuildTree(), { "open", "close", "go" } )
ADD TO oBrw DATA oBrw:oTreeItem:Cargo[ 1 ] HEADER "Last"
ADD TO oBrw DATA oBrw:oTreeItem:Cargo[ 2 ] HEADER "First"
oBrw:CreateFromCode()
oBrw:aCols[ 1 ]:cHeader = "State"
oWnd:oClient = oBrw
ACTIVATE WINDOW oWnd
return nil
static function BuildTree()
local oTree, cState
TREE oTree
while ! Eof()
if Empty( cState )
_TreeItem( Customer->State ):Cargo := { Space( 20 ), Space( 20 ) }
TREE
cState = Customer->State
else
if cState != Customer->State
ENDTREE
cState = Customer->State
_TreeItem( Customer->State ):Cargo := { Space( 20 ), Space( 20 ) }
TREE
endif
endif
if Customer->State == cState
_TreeItem( Customer->City ):Cargo := { Customer->Last, Customer->First }
endif
SKIP
enddo
ENDTREE
ENDTREE
GO TOP
return oTree
[/code:puy0br0g][url=http://imageshack.us:puy0br0g][img:puy0br0g]http://img357.imageshack.us/img357/6598/tree3lw5.jpg[/img:puy0br0g][/url:puy0br0g] |
oTree for xBrowse sample... | It's a very good sample.What changes should I make on the above sample to display the tree if the user hit enter key also. Right now tree is displayed only when the user double click on the Data.RegardsAnser |
oTree for xBrowse sample... | In order to open the browse tree with the keyboard (return key) this change in Class TXBrowse is required:[code:1tycm4vf]
METHOD KeyChar( nKey, nFlags ) CLASS TXBrowse
...
case nKey == VK_RETURN
oCol := ::SelectedCol()
if oCol:nEditType > 0
...
else
If( ::oTreeItem:oTree != nil,( ::oTreeItem:Toggle(), ::Refresh() ),) // new !!!
endif
...
[/code:1tycm4vf]
In the example, to select the entire row:
[code:1tycm4vf]
oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
[/code:1tycm4vf][url=http://imageshack.us:1tycm4vf][img:1tycm4vf]http://img399.imageshack.us/img399/8106/treekr8.png[/img:1tycm4vf][/url:1tycm4vf] |
oTree for xBrowse sample... | Thankyou Mr.Antonio,Modifying the xBrowse.Prg means either I have to include the modified xBrowse.Prg along with my project or I should generate FiveH.Lib (Harbour) and FiveHx.Lib (xHarbour) to generate a modified lib to reflect the changes made in xBrowse.Prg. Am I right ?.Is there a batch file available to generate FiveH.Lib and FiveHx.Lib ?.Sorry for asking questions which is out of topic of this particular thread. I thought it might be useful for beginners like me who read this thread. Would have been better if we had some solution without altering the xBrowse source.RegardsAnser |
oTree for xBrowse sample... | Anser,You can do it both ways:1: Modify xbrowse.prg and compile it and link it as another PRG of your application.2: Modify xbrowse.prg and compile it and update FiveH.lib or FiveHX.lib (if you use Harbour or xHarbour)To rebuild the library you can use this batch file:[code:2gr9mm90]
for %%f in (*.prg) do c:\harbour\bin\harbour %%f /n /ic:\fwh\include;c:\harbour\include
for %%f in (*.c) do c:\bcc55\bin\bcc32 -c -Ic:\bcc55\include;c:\harbour\include %%f
for %%f in (*.obj) do c:\bcc55\bin\tlib fiveh.lib -+ %%f /0 /P32,,
[/code:2gr9mm90] |
oTree for xBrowse sample... | Thankyou Mr.Antonio |
oTree for xBrowse sample... | Senior Linales,Thank you for the kind help.... Your expertise is utmost needed.My best regards! |
oTree for xBrowse sample... | Dear Mr. Antonio,
How can I make a tree with more than 2 levels using xbrowse?
like:
AK
|
+--Tarzana
|
+-----another level under Tarzana
|
+---- another level under under Tarzana
Best regards,
Frances
[quote="Antonio Linares":2n1w6iua]Frances, Detlef,
Here you have a working example:
[code=fw:2n1w6iua]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw<br /><br /> USE Customer<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Field->State <span style="color: #0000ff;">TO</span> State<br /> SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"State"</span><br /> GO TOP<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"DbfTree"</span><br /><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd LINES CELL<br /><br /> oBrw:<span style="color: #000000;">SetTree</span><span style="color: #000000;">(</span> BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"State"</span><br /><br /> oWnd:<span style="color: #000000;">oClient</span> = oBrw<br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oTree, cState<br /><br /> TREE oTree<br /> <span style="color: #00C800;">while</span> ! Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cState <span style="color: #000000;">)</span><br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := RecNo<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> TREE<br /> cState = Customer->State<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">if</span> cState != Customer->State<br /> ENDTREE<br /> cState = Customer->State<br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := RecNo<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> TREE<br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">if</span> Customer->State == cState<br /> _TreeItem<span style="color: #000000;">(</span> Customer->City <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := RecNo<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> SKIP<br /> <span style="color: #00C800;">enddo</span><br /> ENDTREE<br /> ENDTREE<br /><br /> GO TOP<br /><br /><span style="color: #00C800;">return</span> oTree<br /> </div>[/code:2n1w6iua][/quote:2n1w6iua] |
oTree for xBrowse sample... | [code=fw:1rvqketo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />*<br />* XbTree2.Prg<br />* 24-12-2010 08:39 PM<br />*<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ord.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />REQUEST DBFCDX<br /><br />#xtranslate bmp<span style="color: #000000;">(</span> <c> <span style="color: #000000;">)</span> => <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\"</span> + <c> + "</span>.bmp<span style="color: #ff0000;">"<br /><br />//----------------------------------------------------------------------------//<br /><br />function Main()<br /><br /> CreateTestData()<br /> TreeBrowse()<br /><br />return (0)<br /><br />//----------------------------------------------------------------------------//<br /><br />init procedure PrgInit<br /><br /> SET DATE ITALIAN<br /> SET CENTURY ON<br /> SET TIME FORMAT TO "</span>HH:<span style="color: #000000;">MM</span>:<span style="color: #000000;">SS</span><span style="color: #ff0000;">"<br /> SET EPOCH TO YEAR(DATE())-50<br /><br /> SET DELETED ON<br /> SET EXCLUSIVE OFF<br /><br /> RDDSETDEFAULT( "</span>DBFCDX<span style="color: #ff0000;">" )<br /><br /> XbrNumFormat( 'I', .t. )<br /> SetKinetic( .f. )<br /> SetGetColorFocus()<br /><br />return<br /><br />//----------------------------------------------------------------------------//<br /><br />exit procedure PrgExit<br /><br /> SET RESOURCES TO<br /><br />return<br /><br />//----------------------------------------------------------------------------//<br /><br />static function TreeBrowse<br /><br /> local oDlg, oBrw, oFont<br /> local aTot := { 0, 0 }<br /> local aColors := { { CLR_WHITE, CLR_GREEN }, ;<br /> { CLR_BLACK, RGB(255,255,180) }, ;<br /> { CLR_BLACK, CLR_WHITE } }<br /><br /> DEFINE FONT oFont NAME "</span>TAHOMA<span style="color: #ff0000;">" SIZE 0,-12<br /> DEFINE DIALOG oDlg SIZE 600,500 PIXEL ;<br /> TITLE "</span><span style="color: #0000ff;">Xbrowse</span> Tree<span style="color: #ff0000;">" FONT oFont<br /><br /> @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;<br /> CELL LINES NOBORDER FOOTERS<br /><br /> oBrw:SetTree( MakeTree( aTot ), { bmp( "</span>open<span style="color: #ff0000;">" ), bmp( "</span><span style="color: #0000ff;">folder</span><span style="color: #ff0000;">" ), bmp( "</span>spurce<span style="color: #ff0000;">" ) } )<br /><br /> ADD TO oBrw DATA oBrw:oTreeItem:Cargo[ 1 ] PICTURE "</span><span style="color: #000000;">999</span>,<span style="color: #000000;">999</span>,<span style="color: #000000;">999</span><span style="color: #ff0000;">" HEADER "</span>Sales<span style="color: #ff0000;">"<br /> ADD TO oBrw DATA oBrw:oTreeItem:Cargo[ 2 ] PICTURE "</span><span style="color: #000000;">999</span>,<span style="color: #000000;">999</span>,<span style="color: #000000;">999</span><span style="color: #ff0000;">" HEADER "</span>Margin<span style="color: #ff0000;">"<br /><br /> WITH OBJECT ( oBrw:Percent := { || oBrw:Margin:Value / oBrw:Sales:Value * 100 } )<br /> :cHeader := "</span>%<span style="color: #ff0000;">"<br /> :cEditPicture := "</span><span style="color: #000000;">999.99</span> %<span style="color: #ff0000;">"<br /> :bFooter := { || aTot[ 2 ] / aTot[ 1 ] * 100 }<br /> END<br /><br /> WITH OBJECT oBrw<br /> :bClrStd := { || aColors[ oBrw:oTreeItem:nLevel ] }<br /> :Item:cHeader := "</span>Area<span style="color: #ff0000;">"<br /> :Sales:bFooter := { || aTot[ 1 ] }<br /> :Margin:bFooter := { || aTot[ 2 ] }<br /> :nStretchCol := 1<br /> END<br /><br /> oBrw:CreateFromCode()<br /> oBrw:oTree:OpenAll()<br /><br /> ACTIVATE DIALOG oDlg CENTERED<br /> RELEASE FONT oFont<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//<br /><br />static function MakeTree( aTot )<br /><br /> local oTree<br /> local cRegion, cCountry<br /> local oRegion, oCountry<br /><br /> USE SALEDATA NEW ALIAS SD SHARED READONLY<br /> SET ORDER TO TAG AREA<br /> GO TOP<br /><br /> TREE oTree<br /><br /> do while !SD->( eof() )<br /> TREEITEM oRegion PROMPT SD->REGION CARGO { 0, 0 }<br /> cRegion := SD->REGION<br /><br /> TREE<br /> do while SD->REGION == cRegion<br /> TREEITEM oCountry PROMPT SD->COUNTRY CARGO { 0, 0 }<br /> cCountry := SD->COUNTRY<br /><br /> TREE<br /> do while SD->COUNTRY == cCountry<br /><br /> TREEITEM SD->CITY CARGO { SD->SALES, SD->MARGIN }<br /> oCountry:Cargo[ 1 ] += SD->SALES<br /> oCountry:Cargo[ 2 ] += SD->MARGIN<br /><br /> SD->( DbSkip( 1 ) )<br /> enddo<br /> ENDTREE<br /> oRegion:Cargo[ 1 ] += oCountry:Cargo[ 1 ]<br /> oRegion:Cargo[ 2 ] += oCountry:Cargo[ 2 ]<br /> enddo<br /> ENDTREE<br /> aTot[ 1 ] += oRegion:Cargo[ 1 ]<br /> aTot[ 2 ] += oRegion:Cargo[ 2 ]<br /><br /> enddo<br /><br /> ENDTREE<br /> CLOSE SD<br /><br />return oTree<br /><br />//----------------------------------------------------------------------------//<br /><br />static function createTestData()<br /><br /> field REGION,COUNTRY,CITY<br /><br /> local aCols := { ;<br /> { "</span>REGION<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 10, 0 }, ;<br /> { "</span>COUNTRY<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 10, 0 }, ;<br /> { "</span>CITY<span style="color: #ff0000;">", "</span>C<span style="color: #ff0000;">", 10, 0 }, ;<br /> { "</span>SALES<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 10, 0 }, ;<br /> { "</span>MARGIN<span style="color: #ff0000;">", "</span>N<span style="color: #ff0000;">", 10, 0 } }<br /><br /> local i,n,m<br /><br /> DbCreate( "</span>SALEDATA.DBF<span style="color: #ff0000;">", aCols )<br /><br /> USE SALEDATA EXCLUSIVE<br /><br /> for i := 1 to 20<br /><br /> APPEND BLANK<br /> n := HB_RandomInt( 1, 4 )<br /> REGION := { "</span>AMERICAS<span style="color: #ff0000;">","</span>EUROPE<span style="color: #ff0000;">","</span>ASIA<span style="color: #ff0000;">","</span>OCEANA<span style="color: #ff0000;">" }[ n ]<br /> m := HB_RandomInt( 1, 2 )<br /> COUNTRY := {{"</span>USA<span style="color: #ff0000;">","</span>CANADA<span style="color: #ff0000;">"},{"</span>ITALY<span style="color: #ff0000;">","</span>SPAIN<span style="color: #ff0000;">"},{"</span>CHINA<span style="color: #ff0000;">","</span>INDIA<span style="color: #ff0000;">"},{"</span>AU<span style="color: #ff0000;">","</span>NZ<span style="color: #ff0000;">"}}[ n, m ]<br /> CITY := "</span>City <span style="color: #ff0000;">" + StrZero( i, 2 )<br /> n := HB_Random( 10000,1000000 )<br /> m := HB_Random( 1000, n * 0.1 )<br /> FIELD->SALES := n<br /> FIELD->MARGIN := m<br /><br /> next i<br /><br /> INDEX ON REGION+COUNTRY+CITY TAG AREA<br /> CLOSE DATA<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//<br /></span></div>[/code:1rvqketo]
You can use the above logic to create any number of levels
[url=http://img811.imageshack.us/i/xbtree2.jpg/:1rvqketo][img:1rvqketo]http://img811.imageshack.us/img811/46/xbtree2.jpg[/img:1rvqketo][/url:1rvqketo] |
oTree for xBrowse sample... | Dear Mr. RAO,
Thanks so much for a great sample...
We can define number of levels by code..
What if the user wish to create level after level of tree using xbrowse? Is that possible with xbrowse (RDD)?
Regards,
Frances
HAPPY NEW YEAR!!! |
oTree for xBrowse sample... | Please also see the samples I posted here, using related DBFs to show as tree
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=20761&p=110295#p110295">viewtopic.php?f=6&t=20761&p=110295#p110295</a><!-- l --> |
oTree for xBrowse sample... | [quote="nageswaragunupudi":1qx09q0a]Please also see the samples I posted here, using related DBFs to show as tree
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=20761&p=110295#p110295">viewtopic.php?f=6&t=20761&p=110295#p110295</a><!-- l -->[/quote:1qx09q0a]
Thanks Mr. RAO... i've been waiting for your reply.
Your sample shows 2 level... i'm having problem with multiple level..
I hope you have a similar example.
Kind regards,
Frances |
oTree for xBrowse sample... | [quote="fraxzi":bu1qub6l][quote="nageswaragunupudi":bu1qub6l]Please also see the samples I posted here, using related DBFs to show as tree
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=20761&p=110295#p110295">viewtopic.php?f=6&t=20761&p=110295#p110295</a><!-- l -->[/quote:bu1qub6l]
Thanks Mr. RAO... i've been waiting for your reply.
Your sample shows 2 level... i'm having problem with multiple level..
I hope you have a similar example.
Kind regards,
Frances[/quote:bu1qub6l]
The logic for construction of trees is similar for any number of levels. Can you explain a situation where you are looking for a solution? |
oTree para video FUNCIONANDO | Confieso no tener ni idea de como tratar los objetos Tree, nunca los he necesitado, pero he cogido un ejemplo del foro y es lo que estoy buscando para poder ver, añadir, borrar ficheros de video a mi aplicación. A ver si me podeis echar una mano en como seleccionar un fichero de los que muestra el tree.
[code=fw:3pl81a0t]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> Video<span style="color: #000000;">(</span><span style="color: #ff0000;">".<span style="color: #000000;">\D</span>AT<span style="color: #000000;">\V</span>ID<span style="color: #000000;">\"</span>+"</span>DOC000003<span style="color: #ff0000;">"+"</span>.*<span style="color: #ff0000;">")<br />Return nil<br /><br /><br />function Video()<br /> parameters x_file, x_msg<br /><br /> local oDlg, oTree<br /><br /> DEFAULT x_msg := "</span>Fichero no localizado...<span style="color: #ff0000;">"<br /><br /> DEFINE DIALOG oDlg SIZE 500, 340 TITLE "</span>Archivos de video relacionados<span style="color: #ff0000;">"<br /><br /> @ 0.5, 1 TREEVIEW oTree OF oDlg SIZE 100, 150<br /><br /> @ 1, 27 BUTTON "</span>&Ver<span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION (msginfo(oTree:GetSelected():cPrompt) , oDlg:End()) DEFAULT //(WinExec("</span>CMD /C START /separate <span style="color: #ff0000;">" + x_file,0)<br /><br /> @ 3, 27 BUTTON "</span>&Añadir <span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION (CopyFile(cGetFile("</span>*.mp4;*.mov;*.avi;*.mkv;*.flv;*.swf;*.m4v<span style="color: #ff0000;">" ,"</span>Selecciona fichero<span style="color: #ff0000;">", , "</span>..<span style="color: #ff0000;">"), x_file ), oDlg:End())<br /><br /><br /> <br /> @ 5, 27 BUTTON "</span>&Borrar <span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION oDlg:End() DEFAULT<br /><br /> @ 7, 27 BUTTON "</span>&Abandonar<span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION ( cValue := nil, oDlg:End() )<br /><br /><br /> ACTIVATE DIALOG oDlg CENTERED ;<br /> ON INIT FillTree( oTree, x_file )<br /><br />return nil<br /><br /><br />function FillTree( oTree, cPath, oItem )<br /><br /> local aInfo := Directory( cPath, "</span>D<span style="color: #ff0000;">" )<br /> local n, oNode<br /><br /><br /> xbrowse (aInfo)<br /> for n = 1 to Len( aInfo )<br /> if ! aInfo[ n ][ 1 ] $ "</span>.,..<span style="color: #ff0000;">"<br /> if oItem == nil<br /> oNode = oTree:Add( aInfo[ n ][ 1 ] )<br /> else<br /> oNode = oItem:Add( aInfo[ n ][ 1 ] )<br /> endif<br /> if "</span>D<span style="color: #ff0000;">" $ aInfo[ n ][ 5 ]<br /> FillTree( oTree, cPath + aInfo[ n ][ 1 ] + "</span>\<span style="color: #ff0000;">", oNode )<br /> endif<br /> endif<br /> next<br /><br />return nil<br /><br /></span></div>[/code:3pl81a0t]
Cómo puedo seleccionar el fichero que muestra y tengo seleccionado en el tree, he intentado algo como lo siguiente, pero no me da el correcto con el boton Ver:
[quote:3pl81a0t]msginfo(oTree:GetSelected():cPrompt) [/quote:3pl81a0t]
[url=http://es.zimagez.com/zimage/screenshot04811.php:3pl81a0t][img:3pl81a0t]http://es.zimagez.com/miniature/screenshot04811.bmp[/img:3pl81a0t][/url:3pl81a0t] |
oTree para video FUNCIONANDO | Gracias Cristobal ya me esta funcionando. Asi me muestra el video correctamente:
[code=fw:197gpwkp]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">1</span>, <span style="color: #000000;">27</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ver"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> WinExec<span style="color: #000000;">(</span><span style="color: #ff0000;">"CMD /C START /separate "</span> + cFilePath<span style="color: #000000;">(</span>x_file<span style="color: #000000;">)</span> + oTree:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">cPrompt</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span> , oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #00C800;">DEFAULT</span><br /><br /> </div>[/code:197gpwkp] |
oTree para video FUNCIONANDO | Creo que es algo más y no he entendido bien porque a mi si me muestra el item seleccionado
[img:309i5tzs]https://s8.postimg.org/nzv8q5fit/andres01.png[/img:309i5tzs] |
oTree para video FUNCIONANDO | Ya funciona todo, sirve para añadir ficheros de video (solo uno por cada tipo) a un directorio y relacionarlo con un registro por ejemplo:
[code=fw:pti20iyj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//Video(".\DAT\VID\"+RTRIM(Q_T)+".*")</span><br /> Video<span style="color: #000000;">(</span><span style="color: #ff0000;">".<span style="color: #000000;">\D</span>AT<span style="color: #000000;">\V</span>ID<span style="color: #000000;">\"</span>+"</span>DOC000003<span style="color: #ff0000;">"+"</span>.*<span style="color: #ff0000;">")<br />Return nil<br /><br /><br />function Video()<br /> parameters x_file, x_msg<br /><br /> local oDlg, oTree<br /><br /> DEFAULT x_msg := "</span>Fichero no localizado...<span style="color: #ff0000;">"<br /><br /> DEFINE DIALOG oDlg SIZE 500, 340 TITLE "</span>Archivos de video relacionados<span style="color: #ff0000;">"<br /><br /> @ 0.5, 1 TREEVIEW oTree OF oDlg SIZE 100, 150<br /><br /> @ 1, 27 BUTTON "</span>&Ver<span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION ( WinExec("</span>CMD /C START /separate <span style="color: #ff0000;">" + cFilePath(x_file) + oTree:GetSelected():cPrompt,0) , oDlg:End()) DEFAULT<br /><br /> @ 3, 27 BUTTON "</span>&Añadir <span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION ( AddVideo(x_file), oDlg:End() )<br /><br /> @ 5, 27 BUTTON "</span>&Borrar <span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION (iif(MsgYesNo("</span>Deseas eliminar el fichero<span style="color: #ff0000;">"),filedelete(cFilePath(x_file) + oTree:GetSelected():cPrompt),),oDlg:End())<br /><br /> @ 7, 27 BUTTON "</span>&Abandonar<span style="color: #ff0000;">" OF oDlg SIZE 40, 12 ;<br /> ACTION ( cValue := nil, oDlg:End() )<br /><br /><br /> ACTIVATE DIALOG oDlg CENTERED ;<br /> ON INIT FillTree( oTree, x_file )<br /><br />return nil<br /><br /><br />function FillTree( oTree, cPath, oItem )<br /><br /> local aInfo := Directory( cPath, "</span>D<span style="color: #ff0000;">" )<br /> local n, oNode<br /><br /><br /> xbrowse (aInfo)<br /> for n = 1 to Len( aInfo )<br /> if ! aInfo[ n ][ 1 ] $ "</span>.,..<span style="color: #ff0000;">"<br /> if oItem == nil<br /> oNode = oTree:Add( aInfo[ n ][ 1 ] )<br /> else<br /> oNode = oItem:Add( aInfo[ n ][ 1 ] )<br /> endif<br /> if "</span>D<span style="color: #ff0000;">" $ aInfo[ n ][ 5 ]<br /> FillTree( oTree, cPath + aInfo[ n ][ 1 ] + "</span>\<span style="color: #ff0000;">", oNode )<br /> endif<br /> endif<br /> next<br /><br />return nil<br /><br />function AddVideo(x_file)<br /><br /> Local cFile := cGetFile("</span>*.mp4;*.mov;*.avi;*.mkv;*.flv;*.swf;*.m4v<span style="color: #ff0000;">" ,"</span>Selecciona fichero<span style="color: #ff0000;">", , "</span>C:\<span style="color: #ff0000;">")<br /> x_file := cFilePath(x_file) + cFileNoExt(x_file) + "</span>.<span style="color: #ff0000;">" + cFileExt(cFile)<br /> CopyFile(cFile, x_file)<br /><br />Return nil<br /><br /><br /></span></div>[/code:pti20iyj]
[url=http://es.zimagez.com/zimage/screenshot001267.php:pti20iyj][img:pti20iyj]http://es.zimagez.com/miniature/screenshot001267.bmp[/img:pti20iyj][/url:pti20iyj] |
oTree y los itemlevel() | hola.
Con oTree:itemLevel() obtengo el nivel actual, pero para saber cuantas ramas tiene ese nivel, como lo hago?
gracias. |
oTree:GetSelText() | oTree:GetSelText() solo me recoge los 100 primeros caracteres ¿Se puede aumentar este número? ¿Cómo?
Un saludo,
Manuel |
oTree:setCheck() Error! | Hi Antonio, James and friends!I have a little doubt... When I try to check a TVItem, the fivewin gives me the following error:[code:1eptzw5n]Application
===========
Path and name: C:\xGenesis\genesis.EXE (32 bits)
Size: 1,409,536 bytes
Time from start: 0 hours 0 mins 42 secs
Error occurred at: 26/08/2008, 11:57:28
Error description: Error BASE/1004 Message not found: TTVITEM:HWND
Stack Calls
===========
Called from: source\rtl\tobject.prg => TTVITEM:ERROR(172)
Called from: source\rtl\tobject.prg => TTVITEM:MSGNOTFOUND(181)
Called from: source\rtl\tobject.prg => TTVITEM:HWND(0)
Called from: .\source\classes\TTreeVie.PRG => (b)TTREEVIEW:TTREEVIEW(0)
Called from: => TTREEVIEW:SETCHECK(0)[/code:1eptzw5n]
I'm using like this: [b:1eptzw5n]oTree:setCheck( oItem, .T. )[/b:1eptzw5n]
The method setCheck above returns a error for the [b:1eptzw5n]oItem:hWnd[/b:1eptzw5n]
[code:1eptzw5n]METHOD SetCheck( oItem, lOnOff ) INLINE ;
If( oItem == nil, oItem := ::GetSelected(), nil ), ;
TVSetCheck( ::hWnd, oItem:hWnd, lOnOff )[/code:1eptzw5n] |
oTree:setCheck() Error! | I execute a loop into a oMenu:aItems for get the prompts for adding like a option by the TreeView.[code:2cy9e82u]
STATIC FUNCTION loadTreeAccess( oMenu, oTree )
LOCAL oRoot
LOCAL aItens := {}
LOCAL nPos := 0
aItens := oMenu:aItems
FOR nPos := 1 TO len( aItens )
IF valType( aItens[nPos]:bAction ) == "O" .AND. upper( aItens[nPos]:bAction:className() ) == "TMENU"
oRoot := oTree:add( strtran( aItens[nPos]:cPrompt, "&", "" ), 1 )
loadTreeAccess( aItens[nPos]:bAction, oRoot )
ELSEIF !empty( aItens[nPos]:cargo )
oTree:add( strtran( aItens[nPos]:cPrompt, "&", "" ), 1, aItens[nPos]:cargo )
ENDIF
NEXT
RETURN( oTree )
[/code:2cy9e82u]I see the Tree normally, but cannot check the option with setCheck() method. |
oTree:setCheck() Error! | I solved this using directly the function called by the method[b:32yafthj]TVSetCheck( oObjTree:hWnd, oObjItem:hItem, .T. )[/b:32yafthj]and [b:32yafthj]TVGetCheck( oObjTree:hWnd, oObjItem:hItem )[/b:32yafthj]But, the method not works! The erros is the exchange of [u:32yafthj]oObjItem:hItem[/u:32yafthj] for [u:32yafthj]oObjItem:hWnd[/u:32yafthj] |
oTree:setCheck() Error! | Somebody!? |
oTree:setCheck() Error! | Júlio,Yes, you are right, its a bug in Class TTreeView. Fixed, thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->This is the right code:[code:1quik69m]
METHOD GetCheck( oItem ) INLINE ;
If( oItem == nil, oItem := ::GetSelected(), nil ), ;
TVGetCheck( ::hWnd, oItem:hItem )
METHOD SetCheck( oItem, lOnOff ) INLINE ;
If( oItem == nil, oItem := ::GetSelected(), nil ), ;
TVSetCheck( ::hWnd, oItem:hItem, lOnOff )
[/code:1quik69m]Both methods had the bug |
oWdn:Say - SAY class | would someone be so kind to explain the difference of
oWdn:Say
and the SAY class.
oSay is repainted automatically what does this mean for the memory usage.
Thanks in advance
Otto |
oWdn:Say - SAY class | [quote="Otto":jlkb3eo0]would someone be so kind to explain the difference of
oWdn:Say
and the SAY class.
oSay is repainted automatically what does this mean for the memory usage.
Thanks in advance
Otto[/quote:jlkb3eo0]
oWnd:Say() is just a text printed on the specified window while TSay is a real control. And yes, it surely uses more resources but I wouldn't care.
EMG |
oWdn:Say - SAY class | Hello Enrico,
thank you.
But memory seems to be a problem. See my test - prg.
Maybe I call it the wrong way.
But if you call the test function with oSay more times the program crashes.
Regards,
Otto
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
STATIC n
function Main()
local oWnd, oFont
N:=1
DEFINE FONT oFont NAME "Arial" SIZE 20, 30
DEFINE WINDOW oWnd FROM 1, 1 TO 30, 80 TITLE "Testing Method Say()"
@ 1, 1 BUTTON " oWnd : Say " OF oWnd SIZE 60, 25 ;
ACTION test2(oWnd,oFont)
@ 1, 30 BUTTON " oSay " OF oWnd SIZE 60, 25 ;
ACTION test(oWnd,oFont)
ACTIVATE WINDOW oWnd MAXIMIZED
RELEASE FONT oFont
return
//----------------------------------------------------------------------------//
func test(oWnd,oFont)
LOCAL I:=0
FOR N := 1 TO 60 STEP 2
FOR I := 1 TO 200 STEP 4
@ n,I SAY ALLTRIM(STR(i))+" ." OF oWnd FONT ofont COLORS nRGB( 255, 0, 0 ) , nRGB( 55, 55, 255)
NEXT
NEXT
msginfo("ENDE")
return nil
func test2(oWnd,oFont)
LOCAL I:=0
FOR N := 1 TO 60 STEP 2
FOR I := 1 TO 200 STEP 4
oWnd:Say( n, I, ALLTRIM(STR(i))+" .", nRGB( 255, 0, 0 ) , nRGB( 255, 2255, 255),oFont )
NEXT
NEXT
msginfo("ENDE")
return nil |
oWdn:Say - SAY class | [quote="Otto":3qvw0d8r]Hello Enrico,
thank you.
But memory seems to be a problem. See my test - prg.
Maybe I call it the wrong way.
But if you call the test function with oSay more times the program crashes.[/quote:3qvw0d8r]
Yes, because you are creating more and more TSay objects while one would be enough. Once created you can simply refresh it or change its text.
EMG |
oWdn:Say - SAY class | Hello Enrico,
could you show me how to do, please.
Thanks in advance
Otto |
oWdn:Say - SAY class | It depends on what you are trying to do. Generally speaking, consider TSay as any other control. Try to change your sample replacing SAYs with GETs: would it make sense?
Moreover, look at Refresh() and SetText() methods.
EMG |
oWdn:Say - SAY class | I think osay / oget does not work for this job because I need all the information on the proper place.
If I try with Settext, nTop, nLeft and refresh I lose the former information.
Thanks again.
Regards,
Otto |
oWebView:Eval() in a loop | Hi,
In the loop, I call oWebView:Eval() and try to process the results in the Result() function. However, it does not work out in any way <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
[code=fw:3mvl5nyu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">private</span> oDlg, oWebView<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"This is a dialog"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/B"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">200</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">ACTION</span> Start<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">Cargo</span>:=<span style="color: #000000;">{</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">}</span> <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> Html<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> cHtml<br /><br /> <span style="color: #0000ff;">TEXT</span> INTO cHtml<br /> <span style="color: #00C800;">data</span>:<span style="color: #0000ff;">text</span>/html,<br /> <html><br /> <head><br /> <meta charset=<span style="color: #ff0000;">"UTF-8"</span> ><br /> </head><br /> <body <span style="color: #0000ff;">style</span>=<span style="color: #ff0000;">"background-color:cyan"</span>><br /> <button <span style="color: #0000ff;">id</span>=<span style="color: #ff0000;">"bt"</span> <span style="color: #0000ff;">style</span>=<span style="color: #ff0000;">"display:none;"</span>>the test is completed</button><br /> <script><br /> <span style="color: #00C800;">function</span> Test<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span> <span style="color: #000000;">{</span><br /> SendToFWH<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span> ;<br /> <span style="color: #000000;">}</span> ;<br /> <span style="color: #00C800;">function</span> ViwB<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">{</span><br /> el=document.getElementById<span style="color: #000000;">(</span><span style="color: #ff0000;">"bt"</span><span style="color: #000000;">)</span>.<span style="color: #0000ff;">style</span>.<span style="color: #00C800;">display</span>=<span style="color: #ff0000;">""</span> ;<br /> <span style="color: #000000;">}</span> ;<br /> </script><br /> </body><br /> </html><br /> ENDTEXT<br /><span style="color: #00C800;">return</span> cHtml<br /><br />procedure Start<br /><span style="color: #00C800;">local</span> st<br /><br /> <span style="color: #00C800;">if</span> valtype<span style="color: #000000;">(</span>oWebView<span style="color: #000000;">)</span>!=<span style="color: #ff0000;">"O"</span><br /> oWebView := TWebView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWebView:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span><span style="color: #000000;">800</span>, <span style="color: #000000;">200</span><span style="color: #000000;">)</span><br /> oWebView:<span style="color: #000000;">bOnBind</span> = <span style="color: #000000;">{</span> | cJson, nCalls | Result<span style="color: #000000;">(</span>cJson<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oWebView:<span style="color: #000000;">Bind</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SendToFWH"</span> <span style="color: #000000;">)</span><br /> oWebView:<span style="color: #000000;">Navigate</span><span style="color: #000000;">(</span> Html<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">for</span> st=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">5</span><br /> oWebView:<span style="color: #000000;">Eval</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Test("</span>+ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>st<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">")"</span> <span style="color: #000000;">)</span><br /><br /><br />? oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>, oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:=oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">next</span><br />? oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> oWebView:<span style="color: #000000;">Eval</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"ViwB()"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #00C800;">function</span> Result<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> dat<br /><br /> Hb_JsonDecode<span style="color: #000000;">(</span>num, @dat<span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>+=dat<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /><br />? <span style="color: #ff0000;">"C"</span>, oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /><span style="color: #00C800;">return</span></div>[/code:3mvl5nyu] |
oWebView:Eval() in a loop | For me run Ok
[url=https://postimg.cc/D8kLmV6Z:1408l13z][img:1408l13z]https://i.postimg.cc/Yqj3nMm1/natter02.png[/img:1408l13z][/url:1408l13z]
Please try with my executable
<!-- m --><a class="postlink" href="https://bitbucket.org/fivetech/fivewin-contributions/downloads/natterWebView.exe">https://bitbucket.org/fivetech/fivewin- ... ebView.exe</a><!-- m --> |
oWebView:Eval() in a loop | Cristobal, thank you for your help, but when trying to download your example, a message appears -
[b:2s3cwhlf]An error when establishing a secure connection
When connected to bbuseruploads.s3.amazonaws.com an error has occurred. The node received a valid certificate, but access was denied.
[/b:2s3cwhlf] |
oWebView:Eval() in a loop | Dear Natter
What browser are you using?
It is the download server for Fivetech contributions. No one has had any problems. There are already 13 downloads of that file
If when downloading it warns you that the file may be dangerous, ignore the message and download it. |
oWebView:Eval() in a loop | Cristobal, we didn't understand each other. In my example, I tried to show the problem that I had when working with webview.Eval() in a loop. It is as follows -
1. Webview.Eval() executes a certain JS script and returns the result to the FW.
2. Only after receiving this result can I continue executing the loop. It is this check that I do not succeed. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> |
oWebView:Eval() in a loop | Dear Yuri,
Your example works fine here too |
oWebView:Eval() in a loop | In the loop, I call the webview.Eval() method 5 times. Checking the answers looks like this:
1,0 / 2,0 /3,2 / 4,3 / 5,4
Although, as it seems to me, it should be - 1,1 / 2,2 / 3,3 / 4,4 / 5,5
[code=fw:3ftpeb7h]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">private</span> oDlg, oWebView<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"This is a dialog"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/B"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">200</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">ACTION</span> Start<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">Cargo</span>:=<span style="color: #000000;">0</span> <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">local</span> cHtml, flg:=.T.<br /><br /> <span style="color: #0000ff;">TEXT</span> INTO cHtml<br /> <span style="color: #00C800;">data</span>:<span style="color: #0000ff;">text</span>/html,<br /> <html><br /> <head><br /> <meta charset=<span style="color: #ff0000;">"UTF-8"</span> ><br /> </head><br /> <body <span style="color: #0000ff;">style</span>=<span style="color: #ff0000;">"background-color:cyan"</span>><br /> <button <span style="color: #0000ff;">id</span>=<span style="color: #ff0000;">"bt"</span> <span style="color: #0000ff;">style</span>=<span style="color: #ff0000;">"display:none;"</span>>Start process</button><br /> <script><br /> <span style="color: #00C800;">function</span> Test<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span> <span style="color: #000000;">{</span><br /> SendToFWH<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span> ;<br /> <span style="color: #000000;">}</span> ;<br /> <span style="color: #00C800;">function</span> Viw<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span> <span style="color: #000000;">{</span><br /> el=document.getElementById<span style="color: #000000;">(</span><span style="color: #ff0000;">"bt"</span><span style="color: #000000;">)</span> ;<br /> el.innerText=<span style="color: #ff0000;">"total "</span>+num ;<br /> el.<span style="color: #0000ff;">style</span>.<span style="color: #00C800;">display</span>=<span style="color: #ff0000;">""</span> ;<br /> <span style="color: #000000;">}</span> ;<br /> </script><br /> </body><br /> </html><br /> ENDTEXT<br /><span style="color: #00C800;">return</span> cHtml<br /><br />procedure Start<br /><span style="color: #00C800;">local</span> st<br /><br /> <span style="color: #00C800;">if</span> valtype<span style="color: #000000;">(</span>oWebView<span style="color: #000000;">)</span>!=<span style="color: #ff0000;">"O"</span><br /> oWebView := TWebView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWebView:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span><span style="color: #000000;">800</span>, <span style="color: #000000;">200</span><span style="color: #000000;">)</span><br /> oWebView:<span style="color: #000000;">bOnBind</span> = <span style="color: #000000;">{</span> | cJson, nCalls | Result<span style="color: #000000;">(</span>cJson<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oWebView:<span style="color: #000000;">Bind</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SendToFWH"</span> <span style="color: #000000;">)</span><br /> oWebView:<span style="color: #000000;">Navigate</span><span style="color: #000000;">(</span> Html<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">for</span> st=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">5</span><br /> oWebView:<span style="color: #000000;">Eval</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Test("</span>+ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>st<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">")"</span> <span style="color: #000000;">)</span><br /> millisec<span style="color: #000000;">(</span><span style="color: #000000;">1000</span><span style="color: #000000;">)</span><br /><br />? st, oDlg:<span style="color: #000000;">Cargo</span><br /> <span style="color: #00C800;">next</span><br /> oWebView:<span style="color: #000000;">Eval</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Viw("</span>+ltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>oDlg:<span style="color: #000000;">Cargo</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">")"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #00C800;">function</span> Result<span style="color: #000000;">(</span>num<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> dat<br /><br /> Hb_JsonDecode<span style="color: #000000;">(</span>num, @dat<span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">Cargo</span>:=dat<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /><span style="color: #00C800;">return</span></div>[/code:3ftpeb7h] |
oWnd got focus | Hi all,
how can I know if the main window (oWnd) has focus ?
Thank you in advance. |
oWnd got focus | Hi, take a look at:
<!-- l --><a class="postlink-local" href="http://fivetechsupport.com/forums/viewtopic.php?f=3&t=23320&start=0&hilit=lfocused">viewtopic.php?f=3&t=23320&start=0&hilit=lfocused</a><!-- l --> |
oWnd got focus | Solved. thank you.
if oWnd:owndclient:lFocused=.f. && mdi hasn't the focus
return
endif |
oWnd:End() | [code=fw:1jkdwaju]<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<br /> <span style="color: #00C800;">Public</span> lSair:=.f.<br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> ownd<br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">button</span> obtn ........ <span style="color: #0000ff;">Action</span> <span style="color: #000000;">(</span>lSair:=.t.,ownd:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> ownd;<br /> <span style="color: #0000ff;">valid</span> lSair<br /><br /> <span style="color: #00C800;">function</span> buttonCLOSE<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// execute this when button close of window was clicked.</span><br /> lSair:.t.<br /> ownd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span><br /> </div>[/code:1jkdwaju]
how make to button [X] sysmenu, close direct when receive click.
when use oWnd:bResized return button Minimize / Maximize i want know if have to button Close too.
Someone can help ? thanks |
oWnd:End() | Why don't you try a different approach. Only run your process if the user presses the "Do Whatever" button, something like this:
[code=fw:274itfso]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> lProcess:=.f., oWnd, oBtn<br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> oWnd<br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">button</span> obtn <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Do Whatever"</span>........ <span style="color: #0000ff;">Action</span> <span style="color: #000000;">(</span>lProcess:=.t.,oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> oWnd;<br /> <span style="color: #0000ff;">valid</span> process<span style="color: #000000;">(</span>lProcess<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> Process<span style="color: #000000;">(</span>lProcess<span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">if</span> lProcess<br /> <span style="color: #B900B9;">// do whatever</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> .t.</div>[/code:274itfso] |
oWnd:End() | Like James suggests .. here is a snipit of code to trap the |X| and close and clean up your environment.
Rick
[code=fw:37jjkc9p]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">Static</span> lOK,oWnd<br /><br /><span style="color: #B900B9;">//----------</span><br />Func Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />lOk := .f.<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> BuildMenu<span style="color: #000000;">(</span>oRsFr<span style="color: #000000;">)</span> ;<br />...<br />...<br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> !lOK, FreqClose<span style="color: #000000;">(</span>.T., oRsFr<span style="color: #000000;">)</span>, .F. <span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// traps close</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//------------------//</span><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">FUNCTION</span> BuildMenu<span style="color: #000000;">(</span> oRsFr<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> oMenu1<br /><br /><span style="color: #0000ff;">MENU</span> oMenu1<br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Add ..."</span> ;<br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Edit ..."</span> ;<br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Delete ..."</span> ;<br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&View ..."</span> ;<br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Quit"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// will fire freqclose as well</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> oMenu1 <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//------------------------</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">FUNCTION</span> FreqClose<span style="color: #000000;">(</span> lCLEAN, oRsFr <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> lCLEAN = .T.<br /> lOK := .T.<br /> oBROW:<span style="color: #000000;">cALIAS</span>:=<span style="color: #00C800;">NIL</span><br /> oRsFr:<span style="color: #000000;">CLose</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: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /> </div>[/code:37jjkc9p] |
oWnd:End() oDlg:End() | Hi Antonio
Have started trying to port an actual application.
It seems that neither oWnd:End() nor oDlg:End() work as anticipated.
When I compile the code below Selecting File Exit from the menu does nothing except stop Help About from working, and if I go Help About and hit the Exit button once nothing happens - hit it a second time and the application exits altogether. But the "X" buttons at top right of both the Help About dialog and the main Window seem to work fine. It looks as if oWnd:End() and oDlg:End() don't work properly or at least as I expected and how they do under FiveWin.
Any solutions? Or have I done something wrong? or misunderstanding something?
Here is my code:
//PatMatch.prg
#include "FiveLinux.ch"
// #include "objects.ch"
#define idProgName "File Match Software"
#define idVersion "0.1.1"
#define idCopName "Finalysis Pty. ltd."
#define idCopDate "2007"
#define idBldDate "25 July 2007"
STATIC oWnd
FUNCTION Main()
// oChecker := CHECKER():Create()
DEFINE WINDOW oWnd TITLE "File Match Software - (c) Finalysis 2007" ;
MENU BldInMenu()
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN
FUNCTION BldInMenu()
LOCAL lomMenu
MENU lomMenu
MENUITEM "&File"
MENU
// MENUITEM "&Match" ACTION oChecker:ShowProDlg()
MENUITEM "&Exit" ACTION Exit()
ENDMENU
MENUITEM "&Help"
MENU
MENUITEM "&About" ACTION VerInfo()
ENDMENU
ENDMENU
RETURN lomMenu
FUNCTION VerInfo()
LOCAL lodAbout
DEFINE DIALOG lodAbout TITLE "About Patient Match Software"
@ 2, 2 SAY ( idProgName + " - Version: " + idVersion ) OF lodAbout
@ 4, 2 SAY ( "Build Date: " + idBldDate ) OF lodAbout
@ 6, 2 SAY ( "(c) " + idCopName + " " + idCopDate ) OF lodAbout
@ 8, 2 BUTTON "OK" ACTION ( lodAbout:End() ) ;
OF lodAbout
ACTIVATE DIALOG lodAbout CENTERED
RETURN
Function Exit()
CLS
QUIT
RETURN |
oWnd:End() oDlg:End() | Doug,
We email you new libraries with some changes and also a modified version of your PRG. With these new files is working fine |
oWnd:Line(...) | Hello Antonio,
Is :Line supported by PPC?
oWnd:Line(...)
Thanks in advance
Otto |
oWnd:Line(...) | Otto,
It is not included yet, but you can easily add it from FWH Class TWindow |
oWnd:Line(...) | Hello Antonio,
Only as a reminder.
Thanks in advance
Otto |
oWnd:SaveToJPG() instead of oWnd:SaveToBmp() | Hi Antonio,Can we have a oWndH:SaveToJPG() that does the same as oWnd:SaveToBmp() but saves the screen in JPG format. I know we can save the BMP file from oWnd:SaveToBmp() and than read and save as JPG, but that takes to long. I'd rather would like to have oWnd:SaveToJPG save'ed it directly to JPG.Patrick |
oWnd:SaveToJPG() instead of oWnd:SaveToBmp() | Patrick,Maybe we could use "Shell.Explorer" for it. Going to do some tests.It may sounds crazy but the IE is able to manage all images formats <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
oWnd:Say() ->Transparent on Gradientfil? | Dear All,
I need to use oWnd:Say() on Gradientfil() area and need to Transparnet Backgroup.
How can I do it?
Regards,
Dutch |
oWnd:Say() ->Transparent on Gradientfil? | Hello Dutch,
[img:14uoguvl]http://www.pflegeplus.com/pictures/transtext5.jpg[/img:14uoguvl]
[img:14uoguvl]http://www.pflegeplus.com/pictures/transtext6.jpg[/img:14uoguvl]
[code=fw:14uoguvl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />...<br />@ <span style="color: #000000;">50</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">TITLE</span> oTitle <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">of</span> oWnd TRANSPARENT NOBORDER<br />@ <span style="color: #000000;">10</span>, <span style="color: #000000;">20</span> TITLETEXT <span style="color: #0000ff;">OF</span> oTitle <span style="color: #0000ff;">TEXT</span> <span style="color: #ff0000;">"TEXT-TEST"</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">128</span> <br /><br /><span style="color: #B900B9;">// @ 50, 100 TITLE oTitle SIZE 200, 100 of oWnd TRANSPARENT </span><br /><span style="color: #B900B9;">// @ 25, 35 TITLETEXT OF oTitle TEXT "TEXT-TEST" FONT oFont COLOR 128 </span><br /><span style="color: #B900B9;">// @ 50, 35 TITLETEXT OF oTitle TEXT "MORE TEXT" FONT oFont COLOR 0</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> W_GRAD<span style="color: #000000;">(</span> oWnd, hDC <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// --------- GRADIENT --------------------------------------</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> W_GRAD<span style="color: #000000;">(</span> oWnd, hDC <span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> aGrad := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> W_MOVE, W_COLOR1, W_COLOR2 <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> W_MOVE, W_COLOR2, W_COLOR1 <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <br /><br />GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oWnd:<span style="color: #000000;">nHeight</span>, oWnd:<span style="color: #000000;">nWidth</span>, aGrad, .T. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Gradient Top / Bottom, .F. = Left / Right</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:14uoguvl]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
oWnd:SetMenu | Antonio,
¿Como puedo 'quitar' el menú de una window?
Dicho de otra manera, si establezco un menú con:
oWnd:SetMenu( oMenu )
No puedo quitarlo con:
oWnd:SetMenu( NIL )
¿Como podría hacerlo?
Saludos y gracias,
José Luis Capel |
oWnd:Wsayrect() | This method from TWindow should also accept font, color, etc.! (as in Wsay!) |
oWnd:Wsayrect() | Antonio, i have send to you a new version from WsayRect() for the next build! |
oWnd:bKeyDown | I would like to find out if the control key is press.
I tried like that but it doesn't work:
Thanks in advance,
Otto
oWnd:bLClicked := { |y,x,flags | test() }
func test
if oWnd:bKeyDown() = VK_CONTROL
else
endif |
oWnd:bKeyDown | I find a solution with:
if GetKeyState( VK_CONTROL )
else
endif |
oWnd:bKeydown does not trigger when DEL key pressed | I want to have a save button activate when changes are made to fields on window.
The line below works for most keys, but the Delete and Back keys are ignored.
::oWnd:bKeyDown = { | nKey | if( ! self:lSave .and. (( nKey > 31 .and. nKey < 223) .or. nKey = VK_BACK .or. nKey = VK_DELETE), self:togglesave(), ) }
Is there another (easier) way to detirmine if control changes? |
oWnd:bKeydown does not trigger when DEL key pressed | Try assigning
oGet:bChange
codeblock.
EMG |
oWnd:bKeydown does not trigger when DEL key pressed | I was hoping that I did not need to do that on every get, but if I must I must. |
oWnd:bKeydown does not trigger when DEL key pressed | Then try assigning
oGet:bLostFocus
codeblock.
EMG |
oWnd:bKeydown does not trigger when DEL key pressed | I'm sorry, but that seems like a similar issue. Every get will need to be touched with some routing to check for changes. |
oWnd:bKeydown does not trigger when DEL key pressed | In both cases you can do something similar to this:
[code:29n1ni4h]FOR i = 1 TO LEN( oDlg:aControls )
IF oDlg:aControls[ i ]:ClassName() = "TGET"
oDlg:aControls[ i ]:bLostFocus = ...
ENDIF
NEXT[/code:29n1ni4h]
EMG |
oWnd:bKeydown does not trigger when DEL key pressed | Gale,
If you are using TDatabase (or TData) there is a method Modified() that checks the buffer data (in aBuffer) against the data on the disk to see if there have been any changes.
If you are not using TDatabase, then you can store a copy of all the data in the dialog in an array before the edit, then check it against the array after. This, of course, requires more hand coding which may not be feasible if you have a lot of controls and/or a lot of dialogs.
This is one very good reason (of many) to be using database objects.
James |
oWnd:bKeydown does not trigger when DEL key pressed | using bChange does not work either. When backspace or delete key pressed the bChange is not getting fired.
Here is routine I use
FOR nCounter := 1 TO LEN( oDlg:aControls )
IF oDlg:aControls[ nCounter ]:ClassName() = "TGET" .or. oDlg:aControls[ nCounter ]:ClassName() = "TCHECKBOX"
if oDlg:aControls[ nCounter ]:bChange == nil
// tracelog( oDlg:aControls[ nCounter ]:ClassName() )
oDlg:aControls[ nCounter ]:bChange = { || ::togglesaveon() }
endif
ENDIF
NEXT
I verified with tracelog that proper controls were getting bChange assigned. |
oWnd:bKeydown does not trigger when DEL key pressed | James,
I am trying to add a save button that shows when a change is made.
I use tdatabase but that only works when you check it.
If you change a get then tab to next get there is no visable indication data has changed. I was just wanting a button that would activate showing the user that changes have been made and a save is necessary. |
oWnd:bKeydown does not trigger when DEL key pressed | Gale,
I just had an idea how you can test for changes without much code even if you are not using TDatabase.
At the start of the dialog using the ON INIT clause call something like this:
[code:35v3mfa0] ...on init originalData( oDlg )
function originalData( oDlg )
local i:=0, aBuffer:={}
for i = 1 to len( oDlg:aControls )
aadd( aBuffer, oDlg:aControls[i] )
next
return aBuffer[/code:35v3mfa0]
Then at the end, use something similar to check for changes.
James |
oWnd:bKeydown does not trigger when DEL key pressed | Sorry, I forgot to add my folders on a for next loop
FOR nCounter := 1 TO LEN( oFld:aDialogs[ 1 ]:aControls )
IF oFld:aDialogs[ 1 ]:aControls[ nCounter ]:ClassName() = "TGET" .or. oFld:aDialogs[ 1 ]:aControls[ nCounter ]:ClassName() = "TCHECKBOX"
if oFld:aDialogs[ 1 ]:aControls[ nCounter ]:bChange == nil
tracelog( oFld:aDialogs[ 1 ]:aControls[ nCounter ]:ClassName() )
oFld:aDialogs[ 1 ]:aControls[ nCounter ]:bChange = { || ::togglesaveon() }
endif
ENDIF
NEXT
It is working generally. I may have to change it to your suggestion using bLostFocus and adding a check for oDbf:modified().
Sometimes the backspace or delete keys trigger bChange even though nothing is changed. |
oWnd:bKeydown does not trigger when DEL key pressed | Gale,
Apparently you posted your last message while I was writing my previous reply.
You can just check the oDBF:modified() method in the valid clause of each control.
...VALID if( oDBF:modified(), oSave:enable(),)
James |
oWnd:line/oWnd:bLClicked | Are these functions ready?
Regards
Otto
oWnd:line()
ACTIVATE WINDOW
ON PAINT
ON PAGERIGHT
ON PAGELEFT
ON RIGHT
ON LEFT
ON UP
ON DOWN
ON PAGEUP
ON PAGEDOWN
oWnd:brClicked
oWnd:bLClicked
oWnd:bLButtonUp
oWnd:bMMoved |
oWnd:line/oWnd:bLClicked | Otto,
You can easily check them for yourself reviewing source\classes\window.prg and include\fwce.ch (search for ACTIVATE WINDOW). Thanks |
oWnd:line/oWnd:bLClicked | METHOD Line
does not seem to be there. Can we take the code form FWH?
Regards
Otto |
oWnd:line/oWnd:bLClicked | Otto,
With some of them, yes, you can take them from FWH, but with others you will find unresolved externals from Windows Mobile. |
oWnd:line/oWnd:bLClicked | Hello Antonio,
if I change some lines in window.prg how to compile and link?
Thanks in advance
Otto |
oWnd:line/oWnd:bLClicked | The easiest way is to compile it as it were a PRG of your application.
EMG |
oWnd:line/oWnd:bLClicked | Hello Enrico,
could you post an example of buildce.bat which include also windows.prg.
Thanks in advance
Otto |
oWnd:line/oWnd:bLClicked | I don't have one at hand but basically you have to add
[code:2ahaze1x]%hdir%\bin\harbour window.prg /n /i..\include;%hdir%\include /p %2 %3 > clip.log[/code:2ahaze1x]
and modify
[code:2ahaze1x]%vcdir%\bin\clarm -TP -W3 -c /DARM /DUNICODE /I%hdir%\include /I..\include %1.c window.c[/code:2ahaze1x]
or something very similar.
EMG |
oWnd:oClient := oPanel | Hello,
is it possible to have oWnd:oClient := oPanel in combination with
oPanel:nTop := 20
Thank you in advance
Otto |
oWnd:oClient := oPanel | I not understood can make a test sample ? |
oWnd:oClient := oPanel | Hello Silvio,
In the meantime I found a solution.
But there is another problem. It seems we can't make resizeable windows without a border.
Thank you and best regards
Otto
oWnd:bPainted = { || oPanel:nTop := 30 }
[img:osv2ybei]https://mybergland.com/fwforum/resize5.jpg[/img:osv2ybei] |
oWnd:oClient := oPanel | Otto,
[quote:2ikcs7id]But there is another problem. It seems we can't make resizeable windows without a border.[/quote:2ikcs7id]
it is possible
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=37133&p=221895#p221895">viewtopic.php?f=3&t=37133&p=221895#p221895</a><!-- l -->
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
oWnd:oClient := oPanel | Hallo Uwe,
danke.
Das funkioniert leider nicht.
Das Fenster ist rahmenlos aber die Größe kann nicht verändert werden.
Liebe Grüße
Otto |
oWnd:oClient := oPanel | [quote="Otto":3s7afbgj]Hello Silvio,
In the meantime I found a solution.
But there is another problem. It seems we can't make resizeable windows without a border.
Thank you and best regards
Otto
oWnd:bPainted = { || oPanel:nTop := 30 }
[img:3s7afbgj]https://mybergland.com/fwforum/resize5.jpg[/img:3s7afbgj][/quote:3s7afbgj]
Now I understand sorry
What you use to make the window ..window or dialog ?
I thinkyou must use a dialog command with RESIZABLE then you can make a bresized codeblock where you can set the panel ( are you using tpanelscroll ?)
I made a type of that you want make ( only I insert two xbrowse) but the system is the same
[img:3s7afbgj]https://i.postimg.cc/28wnFGkV/tariife1.jpg[/img:3s7afbgj]
I used
DEFINE DIALOG oDlgTariffe SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE FONT oFont
oDlgTariffe:aMinMaxInfo := { nil, nil, nil, nil, 878, 570, nil, nil } //878, 570
oDlgTariffe:bResized := <||
local oRect := oDlgTariffe:GetCliRect()
local x:= oBrw1:nBottom
oBtnCheck:nLeft := oRect:nRight - 395
oBtnCheck:nTop := oRect:nBottom - 50
oBtnPrint:nLeft := oRect:nRight - 220
oBtnPrint:nTop := oRect:nBottom - 50
oBtnClose:nLeft := oRect:nRight - 120
oBtnClose:nTop := oRect:nBottom - 50
RETURN nil
>
ACTIVATE DIALOG oDlgTariffe CENTERED
you can on oDlgTariffe:bResized insert the refresh of Panel you wish |
oWnd:oClient := oPanel | Hello Silvio,
I tried your code but with your code the DIALOG has a frame.
If I add WS_POPUP style I have no Frame but can't resize the DIALOG.
DEFINE DIALOG oDlg SIZE 880,600 ;
PIXEL TRUEPIXEL RESIZABLE //FONT oFont
// STYLE WS_POPUP
Best regards
Otto |
oWnd:oClient := oPanel | wich is FRAME ? |
oWnd:oClient := oPanel | Hello Silvio,
regards
Otto
[code=fw:1brx24hu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oDlg<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">880</span>,<span style="color: #000000;">600</span> ;<br /><span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE <span style="color: #B900B9;">//FONT oFont</span><br /><br /><br /><span style="color: #B900B9;">// STYLE WS_POPUP</span><br /><br /><br /><span style="color: #B900B9;">/*<br />oDlg:aMinMaxInfo := { nil, nil, nil, nil, 878, 570, nil, nil } //878, 570<br /><br />oDlg:bResized := <||<br />local oRect := oDlg:GetCliRect()<br />local x:= oBrw1:nBottom<br /><br />oBtnCheck:nLeft := oRect:nRight - 395<br />oBtnCheck:nTop := oRect:nBottom - 50<br /><br />oBtnPrint:nLeft := oRect:nRight - 220<br />oBtnPrint:nTop := oRect:nBottom - 50<br /><br />oBtnClose:nLeft := oRect:nRight - 120<br />oBtnClose:nTop := oRect:nBottom - 50<br />RETURN nil<br />><br /><br />*/</span><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;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:1brx24hu]
[img:1brx24hu]https://mybergland.com/fwforum/dlg.png[/img:1brx24hu] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.