topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
?hange the color of a window fragment
|
[code=fw:11zldhal]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrush<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> 0x00A5FF<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> FillRect<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">{</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">80</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">200</span> <span style="color: #000000;">}</span>, oBrush:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:11zldhal]
|
?hange the color of a window fragment
|
Thank you, this is what you need
|
?ompile with FWH1507
|
Hello,
I tried to compile my program with FWH1507/BCC7/xHarbour but I get the error:
Fivewin.ch (1918) Error E0004 STATIC declaration follows executable statement
This line inFiweWin.ch described the static variable:
static aFwStack := {}
This error appears only if the program has SET PROCEDURE TO ..
What is it ?
|
?ompile with FWH1507
|
You need to keep #include "fivewin.ch" at the very top of the program
|
?ompile with FWH1507
|
In all files of my program fiivewin.ch keep the first row and to version 1507 problems with the compilation was not
|
?ompile with FWH1507
|
Please comment out lines 1918 to 1923 in your copy of fivewin.ch
|
?ompile with FWH1507
|
Thank's
|
@ SAY GET without resources
|
Hello.
I have no example about this and if I write
@ 10,10 say "Nombre " GET mRaso
@ 20,10 say "Calle " GET mCalle
READ
I get the fields one over the other.
Note: I have never used resources and have no resources editor
|
@ SAY GET without resources
|
You should use separate @ row, col commands for SAY and GET.
EMG
|
@ SAY GET without resources
|
Jose,
Please review samples\tutor05.prg source code.
READ is not used in FiveWin.
|
@ SAY GET without resources
|
[quote="josevalle":16q024qh]Note: I have never used resources and have no resources editor[/quote:16q024qh]
Please review the PRGs provided in samples directory that also have a RC file with the same name. Resources use is easy and it will speed up very much your development.
You may download the free Pelles C resources editor, builted in the Pelles C IDE from here: <!-- m --><a class="postlink" href="http://www.smorgasbordet.com/pellesc/">http://www.smorgasbordet.com/pellesc/</a><!-- m -->
|
@ SAY GET without resources
|
With the Pelles resource editor I have changed the names and the sizes. But it also chages some things in the header of the file.
I have a workaround, just copy from the new files what refers to the dialog and paste in you tutor04.rc.
Thanks Antonio.
|
@ ...... listbox
|
Hello,
I'm new to FiveWin and i got into trouble with listboxes:
I have a program with this code:
[code:1kd1u9xq]
#include "FWCE.ch"
REQUEST DBFCDX
STATIC oWnd, oBrw
function Main()
USE ( CurDir() + "\dbfs\pedido" ) alias pedido VIA "DBFCDX"
desenhar_janela()
ACTIVATE WINDOW oWnd
return nil
function desenhar_tabela()
.
.
@ 70, 3 LISTBOX oBrw FIELDS pedido->cama HEADERS "Cama" ;
SIZE 237, 150 pixel
.
.
return nil
[/code:1kd1u9xq]
where: pedido is a DBF table with a field called "cama" and 3 records on it.
I open the table in the
All seems to work fine, but all i see is the listbox space with the "Cama" header, nut no records on it.
What am i doing wrong?
Thank you,
Joaquim
|
@ ...... listbox
|
Joaquim
It is not the correct way to do it
Try to code something like the ollowing
Define window first,
Open the file
Define the listbox object
Activate the window
This is a workig sample
DEFINE WINDOW OWND1 TITLE "A Faire"
DEFINE FONT aFONT NAME "TAHOMA" SIZE 0,-12
// HideKeyboard()
@ 0, 0 LISTBOX oBrw ;
FIELDS DEPANBMP(BLEU,JAUNE,vert,rouge,blanc), ;
SUBS(TRNDATE(PKDEPAN->DATEDEP),1,5), ;
TRANSFORM(PKDEPAN->Hdeb,"@Z 99.99") , ;
GETCLI(PKDEPAN->CLIREEL) ;
HEADERS " ","Date","Heure","Client" ;
FIELDSIZES 15,40,30,150 ;
ON CLICK SHOWstat(OBRW) ;
FONT AFONT ;
COLORS CLR_BLACK, CLR_WHITE ;
SIZE GETSYSMETRICS( SM_CXSCREEN ) , GETSYSMETRICS( SM_CYSCREEN ) - 30 OF OWND1
OBRW:nClrBackHead := CLR_YELLOW // header
OBRW:nClrForeHead := CLR_HBLUE // header
ACTIVATE WINDOW OWND1 MODAL
AFONT:END()
Hth
Richard
|
@ ...... listbox
|
Thank you Richard, your reply was very helpful.
But the real problem was in something that i didn't said in the first post:
Before the grid was displayed, the program called a function that opened another table, and because i didn' put the clause 'new' in 'use' (i'm a VFP man - i'm used to 'use table in 0') the program opened the new table in the work area of the first table, therefore there was nothing to show.
Thank you anyway.
Joaquim
|
@ SAY
|
I have an issue with @ SAY that I don't quite understand. Using it is not too difficult, and I get it to update and show on the screen without issue, which is controlled by navigation through and xbrowse. The problem I have is that each time the text is changed and the screen gets refreshed, text previously displayed is just overlayed with the updated text. How do I clear previously written text so it doesn't just overlay but instead clears the defined region the only displays the updated text?
Robb
|
@ SAY
|
Robb,
oSay:SetText( "new text" )
The Method SetText() is implemented in Class TWindow so it can be used on dialogs and most controls <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
@ SAY
|
Antonio,
I sent you an email with a small screen shot of what I see. I am using SayText() to update the text, it is the clearing of previously written text that is eluding me.
Robb
|
@ SAY
|
If I remember correctly, the new text has to be longer than the old text--if needed add spaces.James
|
@ SAY
|
I just remembered that I usually use something like:padr(cNewText,30)Substitute 30 with whatever your maximum length is.
|
@ SAY
|
Robb,
This example seems to work fine here: (right click on the dialog to change the text)
[code=fw:18m1pyic]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg<br /><br /> SetDlgGradient<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">199</span>, <span style="color: #000000;">216</span>, <span style="color: #000000;">237</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">237</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">248</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Hello"</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CLICK</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"bye"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:18m1pyic]
|
@ SAY WITH GET COLOR clause for SAY Only
|
Dear Rao Sir ,
I am using below SAY Statement with GET Control , need COLOR clause to SAY only not GET. as something like given below ...! How we can achieve this ?
[code=fw:2lc8mri3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">":"</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Item_name</span> <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span>,,,<span style="color: #000000;">)</span> , nRGB<span style="color: #000000;">(</span>,,,<span style="color: #000000;">)</span> ; <br /> SAYCOLOR nRGB<span style="color: #000000;">(</span>,,,<span style="color: #000000;">)</span> , nRGB<span style="color: #000000;">(</span>,,,<span style="color: #000000;">)</span> ===> <span style="color: #B900B9;">// COLOR CLAUSE FOR SAY ONLY....!</span><br /> </div>[/code:2lc8mri3]
Thanks
Shridhar
|
@ SAY WITH GET COLOR clause for SAY Only
|
Please try after creating the SAY/GET
[code=fw:35hgelrs]<div class="fw" id="{CB}" style="font-family: monospace;">oGet:<span style="color: #000000;">oSay</span>:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> foreclr, backclr <span style="color: #000000;">)</span></div>[/code:35hgelrs]
|
@ SAY WITH GET COLOR clause for SAY Only
|
Dear Rao Sir ,
Thank you very much...!
Thanks
Shrihdar
|
@ SAY @ GET COORDINATES
|
I am trying to convert .RC dialogs to .PRG windows. I have always used resources in the past, and have very nicely designed, but complex, screens.
I am converting because 1) I want to use a Ribbon Bar that only seems to work with the @ x,y coordinates and is not friendly to resource dialogs, and 2) All examples now seem to be using @ x,y formats.
I have been looking for a way to calculate the correct x,y values based on the settings in the .rc. file. I have not been able to figure out any consistent formula that works.
There is a sample RC2PRG.prg program, and it does a nice job, but the coordinates are not even close to being accurate. The controls all overlap significantly. I don't know if anyone has used this before and perhaps has a multiplier or correction to adapt to today's monitors.
Any guidance on this would be greatly appreciated. I asked about calculating the @ x,y coordinates in the past with no success. I hope this time will be different.
|
@ SAY @ GET COORDINATES
|
+1
|
@ SAY @ GET COORDINATES
|
[quote="TimStone":wq78e7gt]I am trying to convert .RC dialogs to .PRG windows. I have always used resources in the past, and have very nicely designed, but complex, screens.
I am converting because 1) I want to use a Ribbon Bar that only seems to work with the @ x,y coordinates and is not friendly to resource dialogs,[/quote:wq78e7gt]
If this is the reason please stop. You can use ribbon bar with resources too. There is no problem in doing that.
EMG
|
@ SAY @ GET COORDINATES
|
How ? I tried and it failed ? I asked for a sample here and no one answered.
|
@ SAY @ GET COORDINATES
|
You only need to create the ribbon bar in the ON INIT clause of the ACTIVATE DIALOG command.
EMG
|
@ SAY @ GET COORDINATES
|
Right now I have a CLASS, and a METHOD is used to provide a full edit capability. I use a button bar, and all of the code is in that method.
Are you saying to extract the button bar code, and create a FUNCTION or METHOD to create a Ribbon Bar for the ON INIT ?
I sure wish this had documentation, or Samples ... but of course we don't have any.
|
@ SAY @ GET COORDINATES
|
Please search the FWH dir for *.prg files containing the word RIBBON and you will find many samples.
Anyway, the technique is very simple:
[code=fw:296p4su2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> CREATERIBBONBAR<span style="color: #000000;">(</span> oDlg <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">CENTER</span></div>[/code:296p4su2]
Then, in the function CREATERIBBONBAR():
[code=fw:296p4su2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CREATERIBBONBAR<span style="color: #000000;">(</span> oDlg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oRib, oGrp<br /><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRib <span style="color: #0000ff;">OF</span> oDlg …<br /><br /> oDlg:<span style="color: #000000;">oBar</span> = oRib<br /><br /> ADD GROUP oGrp RIBBONBAR oRib ...<br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> ADD <span style="color: #0000ff;">BUTTON</span> GROUP oGrp …<br /><br /> ...<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:296p4su2]
EMG
|
@ SAY @ GET COORDINATES
|
Thank you.
I first worked with some stand alone samples and they were ok. However, when I went in to do it within the program, I got very strange results. I will spend some more time, but I think the problem may be that I am addressing a Method within a class that displays a complex DIALOG, and then trying to overlay it with a button bar using @ x,y commands. I used to call button bars the way you suggest, so I am familiar with the concept. ( Now my button bars are embedded within the full method, ever since Button Bars were modified to use within a resource with a tbar object ).
I also noted that this approach slows down the loading of the screen significantly ...
Tim
|
@ Say transparent on Windows
|
I rarely use @ Say / @ Get, but I'm trying to do something on a Window.
I use the following line to display a string:
@ 40,285 SAY vDate OF oWndc PIXEL SIZE 315,20 CENTER COLOR CLR_BLACK UPDATE
I have to use the CLR_BLACK to see the text. However, I want to use a Brush on the window, and when I do, it shows a white background to the text.
This is not a problem in dialogs with resources, because all text is transparent. If I don't use the COLOR CLR_BLACK, nothing shows up.
So how do I get just the text, using the brush background, with an @ x,y SAY on a WIndow ? I've seen use of the TRANSPARENT command on a Dialog, but it won't parse on a window ...
Tim
|
@ Say transparent on Windows
|
[code:19g21o8z]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd
LOCAL oSay, oBru
DEFINE BRUSH oBru STYLE BORLAND
DEFINE WINDOW oWnd BRUSH oBru
ACTIVATE WINDOW oWnd;
ON PAINT oWnd:Say( 100, 100, "This is a test", CLR_RED, , , .T., .T. )
RETURN NIL[/code:19g21o8z]
EMG
|
@ Say transparent on Windows
|
This is a problem that I have long thought could be easily solved by making all SAYs trasparent by default. I can't think of any reason why anyone would want them not transparent. If they were transparent then we wouldn't have to resort to all these workarounds.
James
|
@ Say transparent on Windows
|
That code might work in a small sample, but to display a screen full of @ Say's makes it very awkward and hard to trace problems that might arise.
So at least I'm not totally out of the loop here ... and I agree with James.
|
@ Say transparent on Windows
|
Honestly, I can't see so many differences between a series of @ SAY and a series of oWnd:Say().
EMG
|
@ Say transparent on Windows
|
When I put together code, its preferably in order, so the say would be one line, and the get right below it. It makes it easier to remember what each get is for, and it makes it easier to make quick formatting changes ( moving a say and get around on the window ).
Here I could have to put a group of say commands all into an activate statement ...
I guess I would consider that an issue when it doesn't have to be that way ( I would think ). I really don't see why we would want the say framed in a white background anyway ( or any color for that matter ).
Tim
|
@ Say transparent on Windows
|
Tim,
Have you tried just putting a non-modal dialog (without borders) on the window and putting the controls on it? You could use the same brush on the dialog as the window so it would be invisible.
James
|
@ Say transparent on Windows
|
[quote="TimStone":kia13vz0]When I put together code, its preferably in order, so the say would be one line, and the get right below it. It makes it easier to remember what each get is for, and it makes it easier to make quick formatting changes ( moving a say and get around on the window ).
Here I could have to put a group of say commands all into an activate statement ...[/quote:kia13vz0]
Nope, you can just put a function call in the ACTIVATE statement:
[code:kia13vz0]ACTIVATE WINDOW oWnd;
ON PAINT MYPAINT()
STATIC FUNCTION MYPAINT()
oWnd:Say( 100, 100, "This is a test 1", CLR_RED, , , .T., .T. )
oWnd:Say( 120, 100, "This is a test 2", CLR_RED, , , .T., .T. )
RETURN NIL[/code:kia13vz0]
EMG
|
@ Say transparent on Windows
|
[quote="TimStone":18skvdbu]I really don't see why we would want the say framed in a white background anyway ( or any color for that matter ).[/quote:18skvdbu]
I agree.
EMG
|
@ Say transparent on Windows
|
I guess most users of FWH would agree. Will Mr Antonio consider making Says transparent by default and with background color by choice?
Would such a change break the existing code of many programs or is it against windows default behaviour ?
Another simple doubt. When oSay:lTransparent works well on Dialog why does it not ( or why should it not ) work the same way on a Window?
|
@ Say transparent on Windows
|
James,
That is exactly what I tried originally ( early thread ) but I couldn't get the dialog to position correctly.
There was a control at 10,10 on the window ( that only worked on windows ) and the dialog just wouldn't position around that ...
|
@ Say transparent on Windows
|
Tim,
>There was a control at 10,10 on the window ( that only worked on windows ) and the dialog just wouldn't position around that ...
What control? And what do you mean "around that?" Did you mean "next to?" Could we see a small sample showing the problem?
James
|
@ Say transparent on Windows
|
Please check your email
|
@ Say transparent on Windows
|
Hey guys,
I vote for standard a "TRANSPARANT" command in the SAY command. So you simply need to add "TRANSPARANT" to all your SAY's. Its the most "backward" compatible solution I think.
Patrick
|
@ Say transparent on Windows
|
Well then we would like to have Says transparent both on dialogs and windows if TRANSPARENT clause is used in the command, without having to put oWnd;Says in the ON INIT clause.
Is that what all would like ?
|
@ xy TSay con Transparencias
|
Cambios a la clase TSay para las transparencias...
Mod TSay class for transparents
este cambio viene del hecho que exista la clausula TRANSPARENT en el REDEFINE del SAY y no en @ x,y SAY
This change comes from the fact that there is a clause TRANSPARENT in REDEFINE SAY and not in @ x, y SAY
Comenzamos/Start
Este Link es un Exe si quieren probar antes de hacer cambios
this link is EXE, if you want to try first before making any changes ...
[url:1r5qha4z]http://www.sitasoft.com/fivewin/test/testsay.rar[/url:1r5qha4z]
testsay.exe con temas / with themes
testsay1.exe sin temas / without themes
[b:1r5qha4z]archivos a editar/file to edit[/b:1r5qha4z]
fivewin.ch
say.prg
[b:1r5qha4z]method a modificar en say.prg/ method to change in say.prg[/b:1r5qha4z]
method new
method Initiate
[b:1r5qha4z]abrir/open fivewin.ch[/b:1r5qha4z]
[i:1r5qha4z]
[b:1r5qha4z]buscar/find[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;">#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">[</span> <oSay> <label: <span style="color: #0000ff;">PROMPT</span>,<span style="color: #0000ff;">VAR</span> > <span style="color: #000000;">]</span> <cText> ;<br /> <span style="color: #000000;">[</span> <pict: <span style="color: #000000;">PICT</span>, PICTURE> <cPict> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <dlg: <span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,<span style="color: #0000ff;">DIALOG</span> > <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lCenter: <span style="color: #0000ff;">CENTERED</span>, <span style="color: #0000ff;">CENTER</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lRight: <span style="color: #0000ff;">RIGHT</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lBorder: <span style="color: #000000;">BORDER</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lPixel: <span style="color: #0000ff;">PIXEL</span>, PIXELS > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS > <nClrText> <span style="color: #000000;">[</span>,<nClrBack> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <update: <span style="color: #0000ff;">UPDATE</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lShaded: <span style="color: #000000;">SHADED</span>, SHADOW > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lBox: BOX > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lRaised: <span style="color: #000000;">RAISED</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <adj: <span style="color: #000000;">ADJUST</span>> <span style="color: #000000;">]</span> ;</div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]agregar despues / add after[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">[</span> <lTrans: <span style="color: #000000;">TRANSPARENT</span>><span style="color: #000000;">]</span>; </div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]buscar/find[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">[</span> <oSay> := <span style="color: #000000;">]</span> TSay<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, <<span style="color: #000000;">{</span>cText<span style="color: #000000;">}</span>>,;<br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><cPict><span style="color: #000000;">]</span>, <oFont>, <.lCenter.>, <.lRight.>, <.lBorder.>,;<br /> <.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;<br /> <.design.>, <.<span style="color: #0000ff;">update</span>.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.> <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]en la linea buscar/ inline find[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"><.adj.> <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]cambiar por / change with[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"><.adj.>, <.lTrans.> <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
[b:1r5qha4z]abrir/open say.prg[/b:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]buscar en methodo NEW/find in Method New[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nRow, nCol, bText, oWnd, cPicture, oFont,; <br /> lCentered, lRight, lBorder, lPixels, nClrText, nClrBack,; <br /> nWidth, nHeight, lDesign, lUpdate, lShaded, lBox, lRaised, lAdjust <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TSay</div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]en linea buscar/ inline find[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;">lAdjust <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
[i:1r5qha4z]
[b:1r5qha4z]cambiar con/ replace with[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;">lAdjust, lTransparent <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]buscar/find[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;">lAdjust := .f.</div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]en linea agregar despues/ inline add after[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;">, lTransparent := .f.</div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]buscar/find[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">lAdjust</span> = lAdjust</div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]agregar despues/add after[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">lTransparent</span> := lTransparent<br /><br /> <span style="color: #00C800;">if</span> ! IsAppThemed<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lTransparent</span> <br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span> <span style="color: #000000;">)</span> .and. !empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrush</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SetBrush</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</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;">endif</span> <br /> </div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]buscar en method initiate/ find in method initiate[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
[i:1r5qha4z][b:1r5qha4z]en linea agregar despues/ inline add after[/b:1r5qha4z][/i:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;">.and. !empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrush</span> <span style="color: #000000;">)</span></div>[/code:1r5qha4z]
ejemplo/example
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> oWnd<br /><span style="color: #00C800;">local</span> oMenu<br /><br /><span style="color: #0000ff;">menu</span> oMenu<br /> <span style="color: #0000ff;">menuitem</span> <span style="color: #ff0000;">"Gradient"</span> <span style="color: #0000ff;">action</span> Dlg_Grad<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">menuitem</span> <span style="color: #ff0000;">"Color"</span> <span style="color: #0000ff;">action</span> Dlg_Color<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">menuitem</span> <span style="color: #ff0000;">"Bitmap"</span> <span style="color: #0000ff;">action</span> Dlg_Bit<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">endmenu</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Say"</span> <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;">400</span>,<span style="color: #000000;">800</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">menu</span> oMenu<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 />procedure Dlg_Grad<br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oSay<br /><span style="color: #00C800;">local</span> oSay2<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br /> <br /> @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent <span style="color: #0000ff;">adjust</span><br /> <br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span><span style="color: #000000;">)</span> <br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> GradientBrush<span style="color: #000000;">(</span> oDlg, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <br /><span style="color: #00C800;">return</span> <br /><br />procedure Dlg_Color<br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oBrush<br /><span style="color: #00C800;">local</span> oSay<br /><br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">color</span> CLR_CYAN<br /> <br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Color Brush"</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent<br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">pixel</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /> <br /> <br /><span style="color: #00C800;">return</span> <br /><br />procedure Dlg_Bit<br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oBrush<br /><span style="color: #00C800;">local</span> oSay<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush file <span style="color: #ff0000;">"cara.bmp"</span><br /> <br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With bitmap Brush"</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent<br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span><span style="color: #000000;">)</span> <br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> osay:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <br /><br /><span style="color: #00C800;">function</span> GradientBrush<span style="color: #000000;">(</span> oDlg, aColors <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> hDC, hBmp, hBmpOld, oBrush<br /> <br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> hDC = CreateCompatibleDC<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hDC</span>, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC, hBmp <span style="color: #000000;">)</span><br /> GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aColors <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> = hBmp<br /> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span> <br /> SelectObject<span style="color: #000000;">(</span> hDC, hBmpOld <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">ReleaseDC</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></div>[/code:1r5qha4z]
[b:1r5qha4z][i:1r5qha4z] RC [/i:1r5qha4z][/b:1r5qha4z]
[code=fw:1r5qha4z]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Add this to your resources RC file</span><br /><br />#ifdef __FLAT__<br /> <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WindowsXP.Manifest"</span><br />#endif</div>[/code:1r5qha4z]
|
@ xy TSay con Transparencias
|
Gracias Tocayo....
Estaba buscando algo parecido a esto desde hace tiempo, tenia pensado hacer unas modificaciones a la clase TSay, pero por falta de tiempo lo deje para otra ocasión...
Bajo y hago las modificaciones mencionadas y comento como me fue...
Muchas gracias, me ahorraste algo de tiempo...
|
@ xy TSay con Transparencias
|
Gracias por tu respuesta,
Es bueno saber que alguien mas lo prueba y que estos cambios se puedan depurar, en caso de ser necesario y estar atentos a posibles mejoras planteadas de los mismo
|
@ xy TSay with Transparent
|
Cambios a la clase TSay para las transparencias...
Mod TSay class for transparents
este cambio viene del hecho que exista la clausula TRANSPARENT en el REDEFINE del SAY y no en @ x,y SAY
This change comes from the fact that there is a clause TRANSPARENT in REDEFINE SAY and not in @ x, y SAY
Comenzamos/Start
Este Link es un Exe si quieren probar antes de hacer cambios
this link is EXE, if you want to try first before making any changes ...
[url:268883oo]http://www.sitasoft.com/fivewin/test/testsay.rar[/url:268883oo]
testsay.exe con temas / with themes
testsay1.exe sin temas / without themes
[b:268883oo]archivos a editar/file to edit[/b:268883oo]
fivewin.ch
say.prg
[b:268883oo]method a modificar en say.prg/ method to change in say.prg[/b:268883oo]
method new
method Initiate
[b:268883oo]abrir/open fivewin.ch[/b:268883oo]
[i:268883oo]
[b:268883oo]buscar/find[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;">#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">[</span> <oSay> <label: <span style="color: #0000ff;">PROMPT</span>,<span style="color: #0000ff;">VAR</span> > <span style="color: #000000;">]</span> <cText> ;<br /> <span style="color: #000000;">[</span> <pict: <span style="color: #000000;">PICT</span>, PICTURE> <cPict> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <dlg: <span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,<span style="color: #0000ff;">DIALOG</span> > <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lCenter: <span style="color: #0000ff;">CENTERED</span>, <span style="color: #0000ff;">CENTER</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lRight: <span style="color: #0000ff;">RIGHT</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lBorder: <span style="color: #000000;">BORDER</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lPixel: <span style="color: #0000ff;">PIXEL</span>, PIXELS > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS > <nClrText> <span style="color: #000000;">[</span>,<nClrBack> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <update: <span style="color: #0000ff;">UPDATE</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lShaded: <span style="color: #000000;">SHADED</span>, SHADOW > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lBox: BOX > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lRaised: <span style="color: #000000;">RAISED</span> > <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <adj: <span style="color: #000000;">ADJUST</span>> <span style="color: #000000;">]</span> ;</div>[/code:268883oo]
[i:268883oo][b:268883oo]agregar despues / add after[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">[</span> <lTrans: <span style="color: #000000;">TRANSPARENT</span>><span style="color: #000000;">]</span>; </div>[/code:268883oo]
[i:268883oo][b:268883oo]buscar/find[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">[</span> <oSay> := <span style="color: #000000;">]</span> TSay<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, <<span style="color: #000000;">{</span>cText<span style="color: #000000;">}</span>>,;<br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><cPict><span style="color: #000000;">]</span>, <oFont>, <.lCenter.>, <.lRight.>, <.lBorder.>,;<br /> <.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;<br /> <.design.>, <.<span style="color: #0000ff;">update</span>.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.> <span style="color: #000000;">)</span></div>[/code:268883oo]
[i:268883oo][b:268883oo]en la linea buscar/ inline find[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"><.adj.> <span style="color: #000000;">)</span></div>[/code:268883oo]
[i:268883oo][b:268883oo]cambiar por / change with[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"><.adj.>, <.lTrans.> <span style="color: #000000;">)</span></div>[/code:268883oo]
[b:268883oo]abrir/open say.prg[/b:268883oo]
[i:268883oo][b:268883oo]buscar en methodo NEW/find in Method New[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nRow, nCol, bText, oWnd, cPicture, oFont,; <br /> lCentered, lRight, lBorder, lPixels, nClrText, nClrBack,; <br /> nWidth, nHeight, lDesign, lUpdate, lShaded, lBox, lRaised, lAdjust <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TSay</div>[/code:268883oo]
[i:268883oo][b:268883oo]en linea buscar/ inline find[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;">lAdjust <span style="color: #000000;">)</span></div>[/code:268883oo]
[i:268883oo]
[b:268883oo]cambiar con/ replace with[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;">lAdjust, lTransparent <span style="color: #000000;">)</span></div>[/code:268883oo]
[i:268883oo][b:268883oo]buscar/find[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;">lAdjust := .f.</div>[/code:268883oo]
[i:268883oo][b:268883oo]en linea agregar despues/ inline add after[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;">, lTransparent := .f.</div>[/code:268883oo]
[i:268883oo][b:268883oo]buscar/find[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">lAdjust</span> = lAdjust</div>[/code:268883oo]
[i:268883oo][b:268883oo]agregar despues/add after[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">lTransparent</span> := lTransparent<br /><br /> <span style="color: #00C800;">if</span> ! IsAppThemed<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lTransparent</span> <br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span> <span style="color: #000000;">)</span> .and. !empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrush</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SetBrush</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</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;">endif</span> <br /> </div>[/code:268883oo]
[i:268883oo][b:268883oo]buscar en method initiate/ find in method initiate[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span></div>[/code:268883oo]
[i:268883oo][b:268883oo]en linea agregar despues/ inline add after[/b:268883oo][/i:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;">.and. !empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrush</span> <span style="color: #000000;">)</span></div>[/code:268883oo]
ejemplo/example
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> oWnd<br /><span style="color: #00C800;">local</span> oMenu<br /><br /><span style="color: #0000ff;">menu</span> oMenu<br /> <span style="color: #0000ff;">menuitem</span> <span style="color: #ff0000;">"Gradient"</span> <span style="color: #0000ff;">action</span> Dlg_Grad<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">menuitem</span> <span style="color: #ff0000;">"Color"</span> <span style="color: #0000ff;">action</span> Dlg_Color<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">menuitem</span> <span style="color: #ff0000;">"Bitmap"</span> <span style="color: #0000ff;">action</span> Dlg_Bit<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">endmenu</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Say"</span> <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;">400</span>,<span style="color: #000000;">800</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">menu</span> oMenu<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 />procedure Dlg_Grad<br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oSay<br /><span style="color: #00C800;">local</span> oSay2<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br /> <br /> @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent <span style="color: #0000ff;">adjust</span><br /> <br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span><span style="color: #000000;">)</span> <br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> GradientBrush<span style="color: #000000;">(</span> oDlg, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <br /><span style="color: #00C800;">return</span> <br /><br />procedure Dlg_Color<br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oBrush<br /><span style="color: #00C800;">local</span> oSay<br /><br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">color</span> CLR_CYAN<br /> <br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Color Brush"</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent<br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">pixel</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /> <br /> <br /><span style="color: #00C800;">return</span> <br /><br />procedure Dlg_Bit<br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oBrush<br /><span style="color: #00C800;">local</span> oSay<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush file <span style="color: #ff0000;">"cara.bmp"</span><br /> <br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With bitmap Brush"</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent<br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Change Text"</span><span style="color: #000000;">)</span> <br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> osay:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <br /><br /><span style="color: #00C800;">function</span> GradientBrush<span style="color: #000000;">(</span> oDlg, aColors <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> hDC, hBmp, hBmpOld, oBrush<br /> <br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> hDC = CreateCompatibleDC<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hDC</span>, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC, hBmp <span style="color: #000000;">)</span><br /> GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aColors <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> = hBmp<br /> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span> <br /> SelectObject<span style="color: #000000;">(</span> hDC, hBmpOld <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">ReleaseDC</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></div>[/code:268883oo]
[b:268883oo][i:268883oo] RC [/i:268883oo][/b:268883oo]
[code=fw:268883oo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Add this to your resources RC file</span><br /><br />#ifdef __FLAT__<br /> <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WindowsXP.Manifest"</span><br />#endif</div>[/code:268883oo]
|
@Adhemar - mod harbour installer
|
Hallo Adhemar,
I would like to ask you if you are still updateing for the mod harbour installer and if so, what is the current link.
Thank you in advance
Otto
|
@Adhemar - mod harbour installer
|
Dear Otto
Mod_Harbour con Apache24
Here the Link
[url:1t7npljr]https://drive.google.com/file/d/1CJkhqKLLAxpoGY6TXhrcE1Jn8gj287oS/view?usp=sharing[/url:1t7npljr]
Updated to 30/06/21
Regards
|
@Uwe Install program for mod harbour
|
Wow !!!
Great work Uwe !!!
Just one observation:
We should not have together mod_harbour and FWH in the same install app. As mod_harbour is free and FWH is commercial.
Users may think that both products are related and they are not.
Besides that, hats off for your superb work <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
|
@Uwe Install program for mod harbour
|
Antonio,
separated. <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: -->
I added 2 new group-buttons
Fivewin-installs can be selected with a extra button now.
Thanks to Otto he gave me the idea to start with the tool. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Iris,
[quote:32z2arbv]Can you tell me, what the firewall-settings are for? [/quote:32z2arbv]
I didn't look in detail at the downloads for the moment.
[color=#0000FF:32z2arbv]To include any new downloads I need :
1. a description for the buttontext
2. the link
3. a text for the button-tooltip[/color:32z2arbv]
with the toolbutton we can download useful tools
like pixelformer, gimp ... or any other programs ( will be added in the next release )
The possible capacity can be extended changing the windowsize.
Another solution is shown with the setup-button
that connects a second window to the main-screen.
capacity :
3 main-buttons
each button includes a menue with 8 buttons
each button shows a submenue with 7 buttons
total = 56 installs each button * 3 = [color=#0000FF:32z2arbv][b:32z2arbv]168 possible installs [/b:32z2arbv][/color:32z2arbv] or downloads
resizing the width of the mainwindow more group-buttons can be defined
I could adjust the height to the defined download-buttons ( 7 )
but I think it looks much better using a fixed size
otherwise moving the window doesn*t make sense if it is to big.
I will add a release-number next to the fivewin-logo
[img:32z2arbv]http://www.pflegeplus.com/IMAGES/Install9.jpg[/img:32z2arbv]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
really nice!
thank you so much <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
@Uwe Install program for mod harbour
|
Lieber Uwe,
ich möchte mich heute mit einer Bitte an dich wenden.
Vielleicht kannst du uns "Fivewinnern" einen professionellen Installer für mod Harbour machen.
Derzeit sieht das ein wenig simpel aus.
Mit lieben Grüßen
Otto
[img:3paxc16y]https://mybergland.com/fwforum/installmod.jpg[/img:3paxc16y]
Download link:
[url:3paxc16y]https://mybergland.com/fwforum/install_xampp_and_modharbour.exe[/url:3paxc16y]
Hier ist der source Code.
[code=fw:3paxc16y]<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 />REQUEST DBFCDX<br />REQUEST DBFFPT<br /><br /><span style="color: #00C800;">static</span> oWnd<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 /> <span style="color: #00C800;">local</span> I := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">local</span> odlg<br /> <span style="color: #00C800;">local</span> aLinks := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> cText := <span style="color: #ff0000;">""</span><br /> <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /> cText += <span style="color: #ff0000;">"Allow Apache through Windows Firewall?"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">""</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->Go to Search of windows."</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->Search 'firewall'"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->open the firewall"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->select Advanced settings."</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->go to Inbound Rules."</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->click on New Rule."</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->select Program"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->press next"</span>+ CRLF<br /><br /> cText += <span style="color: #ff0000;">"->This program path: Browse for httpd.exe"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">" (usually here: c:<span style="color: #000000;">\x</span>ampp<span style="color: #000000;">\a</span>pache<span style="color: #000000;">\b</span>in"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->Allow the connection Next"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->Select 'Allow all - Domain/Private/Public'"</span>+ CRLF<br /> cText += <span style="color: #ff0000;">"->on last page add rule name 'Apache HTTP'"</span>+ CRLF<br /><br /> <span style="color: #00C800;">if</span> lIsDir<span style="color: #000000;">(</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\m</span>od_harbour"</span> <span style="color: #000000;">)</span> = .f.<br /> lMKDir<span style="color: #000000;">(</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\m</span>od_harbour"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Visual Studio C++ Redistributable 2017 x86"</span>, <span style="color: #ff0000;">"https: //aka.ms/vs/15/release/vc_redist.x86.exe"</span>, <span style="color: #ff0000;">"Download the file and run the exe immediately"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Visual Studio C++ Redistributable 2017 x64"</span>, <span style="color: #ff0000;">"https: //aka.ms/vs/15/release/vc_redist.x64.exe"</span>, <span style="color: #ff0000;">"Download the file and run the exe immediately"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"XAMPP"</span>, <span style="color: #ff0000;">"https: //sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.3.8/xampp-windows-x64-7.3.8-2-VC15-installer"</span>, <span style="color: #ff0000;">"Download the file and run the exe immediately"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Allow Apache through Windows Firewall"</span>,<span style="color: #ff0000;">"noLink"</span>, cText <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"mod harbour ZIP file"</span>, <span style="color: #ff0000;">"https: //github.com/FiveTechSoft/mod_harbour/archive/master.zip"</span>, <span style="color: #ff0000;">"Download the file and unpack to c:<span style="color: #000000;">\m</span>od_harbour"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Setup mod harbour with bat-file"</span>, <span style="color: #ff0000;">"https: //winhotel.space/modharbourdoc/setupmodharbour.bat"</span>, <span style="color: #ff0000;">"Download the bat-file and run the bat-file immediately"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span> aLinks, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Setup Apache for mod harbour"</span>, <span style="color: #ff0000;">"https: //winhotel.space/modharbourdoc/modharb.exe"</span> , <span style="color: #ff0000;">"Download the file and run the modharb.exe immediately"</span> <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;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">36</span>, <span style="color: #000000;">60</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Install XAMPP and mod harbour"</span><br /><br /> <span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span> aLinks <span style="color: #000000;">)</span><br /> buttonLinks<span style="color: #000000;">(</span>oDlg, I, aLinks<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">NEXT</span><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> buttonLinks<span style="color: #000000;">(</span>oDlg, I, aLinks<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oBtn<br /><br /> <span style="color: #00C800;">if</span> aLinks<span style="color: #000000;">[</span> I,<span style="color: #000000;">2</span><span style="color: #000000;">]</span> = <span style="color: #ff0000;">"noLink"</span><br /> @ <span style="color: #000000;">1</span> + <span style="color: #000000;">30</span> * I,<span style="color: #000000;">10</span> ;<br /> <span style="color: #0000ff;">BUTTON</span> oBtn ;<br /> <span style="color: #0000ff;">PROMPT</span> aLinks<span style="color: #000000;">[</span> I,<span style="color: #000000;">1</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">25</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> aLinks<span style="color: #000000;">[</span> I,<span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, oBtn:<span style="color: #000000;">disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> @ <span style="color: #000000;">1</span> + <span style="color: #000000;">30</span> * I,<span style="color: #000000;">10</span> ;<br /> <span style="color: #0000ff;">BUTTON</span> oBtn ;<br /> <span style="color: #0000ff;">PROMPT</span> aLinks<span style="color: #000000;">[</span> I,<span style="color: #000000;">1</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">25</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> aLinks<span style="color: #000000;">[</span> I,<span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>,ShellExecute<span style="color: #000000;">(</span> oDlg, <span style="color: #ff0000;">'Open'</span>, aLinks<span style="color: #000000;">[</span> I,<span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, oBtn:<span style="color: #000000;">disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /> </div>[/code:3paxc16y]
|
@Uwe Install program for mod harbour
|
Otto,
no problem,
what is the optics do You like
maybe a window like that with round corners and border
stays on top and can have any color and bordersize ( with transparent level )
The border shown on any position, Buttons can have a 3D-look ( using special images )
[img:1b9ca8gb]http://www.pflegeplus.com/IMAGES/Install1.bmp[/img:1b9ca8gb]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Dear Uwe,
thank you for helping.
Can you please have a look at the modharbour.org web page. Maybe you can take these colors.
Let us ask Antonio to send you the logo.
Thank you and best regards
Otto
|
@Uwe Install program for mod harbour
|
Dear Otto,
[quote:colgd97v]Can you please have a look at the modharbour.org web page. Maybe you can take these colors.
Let us ask Antonio to send you the logo.[/quote:colgd97v]
it gaves me the idea to create a new installer-tool with a config-section.
using a buttonstyle or checkboxes like the FWH-installer.
Inside the config-section there will be a option to choose the style and colors.
( I couldn't find something useful about the colors )
As well there will be something of the new meter-controls included.
I Added a sysmenu ( the design-button will be removed inside the customer-release )
There is still space next to the harbour-image for a progress-wheel
This is just a test adding some objects to see how it looks.
The size can be adjusted to add some comments.
It is easy now to create any kind of installer like You can see.
[img:colgd97v]http://www.pflegeplus.com/IMAGES/Install3.bmp[/img:colgd97v]
[img:colgd97v]http://www.pflegeplus.com/IMAGES/Install2.bmp[/img:colgd97v]
[img:colgd97v]http://www.pflegeplus.com/IMAGES/Install3.png[/img:colgd97v]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Dear Otto,
is there a global Info-text I could show with the HELP-symbol ?
[img:r7a65q2e]http://www.pflegeplus.com/IMAGES/Install4.bmp[/img:r7a65q2e]
All links are working <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
The installer is on top as well inside the internet-browser
NO download on Pos. 4
I still have to include a progress-wheel
Because the selected button will be disabled,
I will add a button < undo > to start the download again in case of any problem.
[img:r7a65q2e]http://www.pflegeplus.com/IMAGES/Install5.bmp[/img:r7a65q2e]
best regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
@Uwe Install program for mod harbour
|
Great Uwe, congratulations
|
@Uwe Install program for mod harbour
|
Dear Uwe,
great work. Really professional and good looking.
In the meantime Antonio made it possible that mod harbour is also running on WINDOWS IIS.
Here is the link and the install documentation. We should make your installer dual - for IIS and for APACHE.
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=45&t=37820">viewtopic.php?f=45&t=37820</a><!-- l -->
I will setup some VS then we can test the installaion.
I will provide you with the credentials. Is RDP for you OK?
Thank you from me and I think also in the name of the Fivewin - community.
Best regards
Otto
|
@Uwe Install program for mod harbour
|
Dear Otto,
as soon I'm starting something, I'm getting more and more ideas <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
[quote:1ddoa5r7]We should make your installer dual - for IIS and for APACHE.[/quote:1ddoa5r7]
I added a [color=#0000FF:1ddoa5r7]switch to the toolbar [/color:1ddoa5r7] ( share ) on top
Undo added ( button enable ) in case of download-problems to try again
The installer can be minimized to the taskbar during working on a download.
What is about the global help-info I asked for
what text do You like to show <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
[img:1ddoa5r7]http://www.pflegeplus.com/IMAGES/Install6.bmp[/img:1ddoa5r7]
[b:1ddoa5r7]changed to IIS[/b:1ddoa5r7]
[b:1ddoa5r7]Works[/b:1ddoa5r7] <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
The subtitle can be changed as well < installs IIS > and < installs APACHE >
I can use the same blue as main-color from the website but maybe better to have a little contrast.
[img:1ddoa5r7]http://www.pflegeplus.com/IMAGES/Install7.jpg[/img:1ddoa5r7]
I'm glad I can help.
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Hello Uwe,
thank you so much.
I am setting up 2 VS with WINDOWS 2019 Server - I had to download an English version as my version only allowed German as language.
Tomorrow I will attach the servers to the internet.
Then we can test the new installation program.
I write you when I am ready.
Best regards
Otto
|
@Uwe Install program for mod harbour
|
Otto,
now we can select from a listbox any install / download we need
( not only 2 options ) with a double-click on the share-symbol.
After a selection the title and inner section of the installer will be complete repainted.
[img:2aatse6d]http://www.pflegeplus.com/IMAGES/Install8.jpg[/img:2aatse6d]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Hi Uwe,
this looks really great. Congratulations!
Is it possible to test the installer?
Kind regards
Iris
|
@Uwe Install program for mod harbour
|
Iris,
no problem
All defined downloads are tested and are working.
DOWNLOAD
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Install1.zip">http://www.pflegeplus.com/DOWNLOADS/Install1.zip</a><!-- m -->
with the new submenu < share > we can add more useful downloads or installs.
Because the tool stays on top You can download everything at once just change
the download-selection like from APACHE to IIS.
In case of a not working download You can activate the deactivated button again.
There is a small reloader included. Changing the download-page
the program will be closed and autostarted with the new repainted page ( selection )
The selected page and screen-position is saved to a INI and will be shown on restart.
I'm still working on the setup to change colors and other settings.
For the moment the dialog is still empty
The help-button is still unused.
We can add a submenu to collect different useful infos.
best regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
@Uwe Install program for mod harbour
|
WOW, Uwe, this tool is so strong.
I have just set up Mod_Harbour on my PC at home. Thanks to you it took me not more than 15 min!
Just great!
XAMPP was no problem at all...
I have only clicked on the links and the installation was done...
Can you tell me, what the firewall-settings are for?
Kind regards
Iris
|
@Uwe Install program for mod harbour
|
I added the setup-section and release-date,
2 graphic-apps downloads and the Fivetech-connection
now it is possible to change the complete color-set
on the left the possible changes and on the right the preview
The fivetech and harbour image are alhablended now with round corners
With the < Save-button > You can save the new values.
The < Exit-button > restores the old values and returns to the main-window.
I will start with a DBF-solution that saves and restores defined links or installs.
It means the user can modify the different positions or add his own links.
DOWNLOAD
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Install1.zip">http://www.pflegeplus.com/DOWNLOADS/Install1.zip</a><!-- m -->
[img:2a9n2t7l]http://www.pflegeplus.com/IMAGES/Install10.jpg[/img:2a9n2t7l]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Hello Uwe,
it seems to me that the window gets during installation minimized and then you have no option to bring it back on screen.
Can you please test it. Also I do not see the msginfos with the text what next to do.
Thank you and best regards
Otto
|
@Uwe Install program for mod harbour
|
Hello Otto,
the next release will include many improvements
like a complete user defined visual-design <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
[quote:2cp56bor]Also I do not see the msginfos with the text what next to do.[/quote:2cp56bor]
< what to do next > is defined inside the tooltip
and show as message at the end of the buttonlist on button-action.
[quote:2cp56bor]it seems to me that the window gets during installation minimized and then you have no option to bring it back on screen.[/quote:2cp56bor]
during a internetconnection the tool stays on top with full size
there is a minimize-button included if wanted to use
but I can check if Iconized at startup if yes set to full size
I added [color=#0000FF:2cp56bor]oWnd:Normal()[/color:2cp56bor] on window-init
there is a iconize-button
@ 15, oWnd:nWidth - 80 BTNBMP oBtnResize ;
FILE c_path1 + "Resize1.bmp", "", "", ;
c_path1 + "Resize2.bmp" ;
FLAT NOBORDER NOROUND ACTION [color=#0000FF:2cp56bor]oWnd:Iconize() [/color:2cp56bor]SIZE 24, 24
oBtnResize:lTransparent := .T.
oBtnResize:cToolTip := { "Minimize", "TASKBAR", 1, CLR_BLACK, 14089979 }
[img:2cp56bor]http://www.pflegeplus.com/IMAGES/Install11.jpg[/img:2cp56bor]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Many improvements
I rebuild and finished the config-section and added predefined brushes
Added 2 buttons for the comming translation and project planing
that means adding Your own download-links and translate all text to Your language.
A new message-area with possible 2 lines.
Full preview at runtime of all selections from the config-section.
DOWNLOAD
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Install2.zip">http://www.pflegeplus.com/DOWNLOADS/Install2.zip</a><!-- m -->
[img:b8ajq0pe]http://www.pflegeplus.com/IMAGES/Install12.jpg[/img:b8ajq0pe]
The next release can work with a project-file
it belongs to the same positions like the hard coded menus and buttons
3 main-groups ( A, B and C )
5 sections each group ( can be more if needed )
7 buttons for each section
You can add a link or run a exe.file
NO seek needed just jump right to the needed button-group with the radio-selection.
Copy / past a link or add a buttontext and message
I think I will change to a dialog without title and round corners to make it equal. <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
[img:b8ajq0pe]http://www.pflegeplus.com/IMAGES/Install13.jpg[/img:b8ajq0pe]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Uwe Install program for mod harbour
|
Again many improvements
I changed < app on top > to < normal > for better working inside the internet
DOWNLOAD
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Install3.zip">http://www.pflegeplus.com/DOWNLOADS/Install3.zip</a><!-- m -->
You can collect any links or exe now and run them using the group-button on the righthand side
Data can be added with cell-double-click or from the get at the bottom.
The focused cell will use the value.
3 DBF's are running synchron now.
Before connecting to the internet, You can open < Notepad > to copy and paste the links.
NO scrollbar needed just use the arrow-buttons on top.
Next steps will be : buttontext and messages are showing the vars from the DBF
[img:1fbm9csw]http://www.pflegeplus.com/IMAGES/Install14.jpg[/img:1fbm9csw]
collect any interesting samples on Your computer or forum-links.
[img:1fbm9csw]http://www.pflegeplus.com/IMAGES/Install15.jpg[/img:1fbm9csw]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
@Z not working
|
Picture "@Z" seems not to be working. If I select enter on the get it should remove the existing value and let me enter a new value. Not working. It leaves the last value of mprod_num and if I enter a new value it adds to the old value instead of removing it.mprod_num is a character.[code:1bkph9fs]
REDEFINE GET oGet[1] VAR mprod_num ID 105 OF oDlg12 PICTURE "@K" UPDATE valid(lValue := fVal(mprod_num),if(lValue == .t.,(getprice(odlg12),getnumber(odlg12,oGet2),newData(oDlg12)),mprod_num := space(20)),.t.) [/code:1bkph9fs]
|
@Z not working
|
Hag,Hmm, did you mean the "@K" picture is not working?James
|
@Z not working
|
Sorry @K....
|
@Z not working
|
Hag,If you remove the VALID clause do you still have the same problem?James
|
@Z not working
|
I guess the effect of @K picture clause is that if we enter any text, it clears the buffer and takes our key strokes, but if we press Enter, the orginal text remains
|
@Z not working
|
Hag,>If I select enter on the get it should remove the existing value and let me enter a new value. Not working. I assume that you are saying that if you arrive at the GET using the Enter key from a previous GET, then the existing value remains.As NageswaraRao says, this is not the way it is supposed to work. From the Clipper manual:"@K Deletes default text if the first key is not the cursor key."James
|
@Z not working
|
This example is working fine here:[code:rrcxtjkn]
#include "FiveWin.ch"
function Main()
local oDlg, cText := "Hello world!"
DEFINE DIALOG oDlg TITLE "@K test"
@ 2, 2 GET cText PICTURE "@K"
ACTIVATE DIALOG oDlg CENTERED
return nil
[/code:rrcxtjkn]
|
@Z not working
|
All:Regarding "@K"I've done everything I can think of and it won't work. The get is a 20 character value. And it seems the only way to do it is swipe the charactersto highlight them then they can be changed. Is there a way when placing an ibeam or left clicking on the get it can automatically hilight all the characters like an internet address bar does.Thanks all
|
@Z not working
|
Harvey,Did you try Antiono's example? I just tried it and it is working fine here. Run the program, type any character and all the text vanishes. If you use the right arrow key, instead, then you can move anywhere in the text. This is exactly how it is supposed to work.Perhaps you were expecting it to work differently?If yours is not working like the above description, then either you have an old version of FWH (the @K was broken some time back--a couple of years ago), or there is something else in your code causing the problem.I am using FWH 8.05.James
|
@Z not working
|
JamesThe only difference between Antonios code and mine is he doesn't use the picture command. I'll check to see if that may be my problem. My FWH was downloaded about a month ago. S/b new. Using 807.Thanks again
|
@Z not working
|
Harvey,My example is using the PICTURE command: @ 2, 2 GET cText [color=red:36u4ekl2]PICTURE "@K" [/color:36u4ekl2]
|
@Z not working
|
Harvey,You must be referring to some other code. I was referring to this code where he is using the picture command.James[code:zj18apy0]#include "FiveWin.ch"
function Main()
local oDlg, cText := "Hello world!"
DEFINE DIALOG oDlg TITLE "@K test"
@ 2, 2 GET cText PICTURE "@K"
ACTIVATE DIALOG oDlg CENTERED
return nil [/code:zj18apy0]
|
@Z not working
|
ooops
|
A ""special"" - question about folders. => solved
|
Hello,The new Browser-tool-version 2a includes many new functionsand is nearly finished.It is possible now, to create Gradient and Non-gradient Header and Footer.Different fonts for Header and Footer ( Gradient and NON-gradient ).Different colors for NON-gradient Header and Footer.[img:2c4hh47g]http://www.pflegeplus.com/pictures/folder3.jpg[/img:2c4hh47g]I have a question :Is it possible, to disable the footer-color-browser on page 2, in relationto the setting < Gradien ON > < Gradient OFF > in page 1 ?It means : If i change to Gradient -display, the 1. color-browseron page 2 has to be disabled.I tested like :[code:2c4hh47g]
REDEFINE FOLDER oFld ID 110 OF oDlg FONT oProgFont ;
PROMPTS " &Header ", " &Footer ", " &Styles / Cells ", ;
" &Data-Colors / Font ", " &Background / Bitmaps ", "Settings" ;
DIALOGS "Browse1","Browse2","Browse3","Browse4","Browse5","Browse6" ;
ON CHANGE( IIF( nOption = 2, ( FOLDER_2(oDlg,oFld,oLbx0, oRESULT0, oLbx6 ), oLbx6:Disable()), NIL ) )
// I changed to < Gradient > in page 1. After that,
// I changed to folder-page 2 and wanted the 1. color-browser disabled.
// but it didn't work.
[/code:2c4hh47g]Is there maybe another solution ?RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
A ""special"" - question about folders. => solved
|
Uwe,You have defined an ON CHANGE for the folders and that is not what you need. You are going to have to disable the browse inside the routine you are using to change the gradient flag.James
|
A ""special"" - question about folders. => solved
|
Hello James,I tested this solution as well and there was a < msgalert > after the define of < browser 1 > in page 2.With the flag from page 1 : Gradient ON / OFF i want to enable / disablethe 1. browser on page 2.It seems, if the folder is defined, the contents of the pages are in memory. When i change to page 2, nothing happens.( the page 2 runs only once at start ).If i use < ON CHANGE > there is a stop, to define anything.The browser for NON-gradient-colorThe msgAlert is shown only once at start !!![code:hwophx32]
oLbx6 := TXBrowse():New( oFld:aDialogs[2] )
oLbx6:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx6:nColDividerStyle := LINESTYLE_BLACK
oLbx6:nRowDividerStyle := LINESTYLE_BLACK
oLbx6:nRecSelColor = 15512898
oLbx6:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx6:bClrSel = { || { 16777215, 15512898 } }
oLbx6:SetArray( aBRCOLOR )
oLbx6:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx6:aCols[ 2 ]:cHeader = Padr("Start", 19)
oLbx6:lHScroll := .F.
oLbx6:lVScroll := .F.
oLbx6:lFooter := .T.
oLbx6:bLClicked := { | nRow, nCol | BR_START := oLbx6:nRowSel, ;
BR_COLOR3 := NEW_COLOR2(), ;
NEW_FPAINT(oLbx0), ;
oBmp1:bPainted := { |hDC|OnPaint1( hDC,oBMP1,BR_COLOR3) }, ;
oBmp1:Refresh(), oBR_COLOR3:Refresh() }
oLbx6:aCols[ 2 ]:AddResource("Black")
oLbx6:aCols[ 2 ]:AddResource("White")
oLbx6:aCols[ 2 ]:AddResource("Blue")
oLbx6:aCols[ 2 ]:AddResource("Green")
oLbx6:aCols[ 2 ]:AddResource("Red")
oLbx6:aCols[ 2 ]:AddResource("Yellow")
oLbx6:aCols[ 2 ]:AddResource("Magenta")
oLbx6:aCols[ 2 ]:bBmpData := {|| oLbx6:nArrayAt }
oLbx6:aCols[ 2 ]:bStrData := {|| oLbx6:aRow[2] }
oLbx6:nArrayAt := 3
oLbx6:nRowSel := 3
oLbx6:nFooterHeight := 15
oLbx6:CreateFromResource( 110 )
// Nothing happens, if you choose page 2
// The MsgAlert is only shown once at start.
IF nHEADGRAD = 1 // Gradient ON
Msgalert( "Disabled" )
oLbx6:Disable()
ENDIF
...
...
...
[/code:hwophx32]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
A ""special"" - question about folders. => solved
|
Uwe,I do not see the code where you are changing the gradient flag. You cannot disable the browse during the screen setup code, or using any ON CHANGE clause. You are changing the gradient flag when the brows is running so you have to disable the other browse inside whatever routine you have that you are using to change the gradient flag.I hope that is more clear.James
|
A ""special"" - question about folders. => solved
|
Hello James,That is the SWITCH-browser on Page 1The position defines the Var < nHEADGRAD > = 1 or 2Inside Page 1, i can enable / disable Browser 2 and 4and it works fine.But i cannot reach the color-browser 1 on page 2The easy way would be, to move this browser to page 1,there it would be no problem, but there is no space anymore.All Header-settings are on Page 1 and the Footer-settings are on page 2 now.[code:2jwbovlr]
// --------------------- GRADIENT ON / OFF on Folder-page 1 ---------------
REDEFINE BUTTONBMP oTITLE10 ID 670 OF oFld:aDialogs[1] ;
ACTION MsgAlert("With this Browser, you set" + CRLF + ;
"the Gradient-Color to Single Color","Gradient" ) ;
BITMAP "Info1" PROMPT " Gradient" TEXTRIGHT
oTITLE10:cToolTip = { "Click the Button" + CRLF + ;
"for information","Click-color", 1, CLR_BLACK, 14089979 }
oLbx50 := TXBrowse():New( oFld:aDialogs[1] )
oLbx50:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx50:nColDividerStyle := LINESTYLE_BLACK
oLbx50:nRowDividerStyle := LINESTYLE_BLACK
oLbx50:SetArray( aHEADGRAD )
oLbx50:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx50:aCols[ 2 ]:cHeader = Padr("Style", 20)
oLbx50:nRecSelColor = 15512898
oLbx50:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx50:bClrSel = { || { 16777215, 15512898 } }
oLbx50:lHScroll := .F.
oLbx50:lVScroll := .F.
oLbx50:lFooter := .T.
oLbx50:nFooterHeight := 15
// On cursor-position 2, Browser oLbx3 and olbx5 are Disabled
// BRW_DISABL(oLbx3) and BRW_DISABL(oLbx5)
// do the Grey-painting
oLbx50:bLClicked := { | nRow, nCol | ( nHEADGRAD := oLbx50:nRowSel, ;
IIF( nHEADGRAD = 2, ( oLbx3:Disable(), oLbx5:Disable(), ;
BRW_DISABL(oLbx3), BRW_DISABL(oLbx5), ;
NEW_HPAINT(oLbx0), NEW_FPAINT(oLbx0) ), ;
( oLbx3:Enable(), oLbx5:Enable(), ;
BRW_ENABL(oLbx3), BRW_ENABL(oLbx5), ;
NEW_HPAINT(oLbx0), NEW_FPAINT(oLbx0) ) ) ) }
oLbx50:aCols[ 2 ]:AddResource("Green")
oLbx50:aCols[ 2 ]:AddResource("Red")
oLbx50:aCols[ 2 ]:bBmpData := {|| oLbx50:nArrayAt }
oLbx50:aCols[ 2 ]:bStrData := {|| oLbx50:aRow[2] }
oLbx50:nArrayAt := 1
oLbx50:nRowSel := 1
oLbx50:CreateFromResource( 150 )
....
....
// -----------------------------------------
FUNCTION BRW_DISABL(oLbx)
*oLbx:bClrGrad := NIL
*oLbx:l2007 := .F.
i := 1
FOR i := 1 TO LEN(oLbx:aCols)
WITH OBJECT oLbx:aCols[i]
:bClrHeader := { || { 0, 13750737 } }
:bClrFooter := { || { 0, 13750737 } }
:bClrStd = { || { 0, 13750737 } }
END
NEXT
oLbx:Refresh()
RETURN( NIL )
[/code:2jwbovlr]
|
A ""special"" - question about folders. => solved
|
Uwe,>But i cannot reach the color-browser 1 on page 2 I assume you mean the variable is not available. You can either make it a public (not recommended), a file-wide static, a static in a set/get function, or make your app into a class and make it DATA.James
|
A ""special"" - question about folders. => solved
|
Hello James,The var < nHEADGRAD > is public.If i click on folder-tab 2, the screen is allways the samelike shown at the 1. folder-opening.The function doesn't test the value of < nHEADGRAD >and modifys the browser. There have been some more alerts in the function.The alerts don't display again, only once at the 1. folder-start.The problem is : inside a page you can modify the values,but from another page ?RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
A ""special"" - question about folders. => solved
|
Uwe,I guess I have still not been clear. The variable for the browse on folder 2 has to be visible--as a public or whatever. >The problem is : inside a page you can modify the values, but from another page ? As long as the variables are accessible, you can change them from anywhere. This is why they have to be publics, statics, or class data.James
|
A ""special"" - question about folders. => solved
|
Hello James,I found out, what is wrong.I had to do my own folder-structure, because the size of the application is very big.I tested my structure with a small sample.Result : the same problem.Page 1 is a button with a counterThe alerts of page 2 and 3 are only shown at prog-start.with a click on tab 2 or 3, no alert displays.But actions inside the pages ( buttons ) are ok.The counter-value display on button-click is ok, but the alerts are notdisplayed. That is the reason, because i don't get the browser disabled.I don't start a action inside of a folder-page to disable the browser. On Button-click it works.Only a folder-tab change, doesn't do this for me.[code:y28nbve1]
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
FUNCTION MAIN()
local oDlg, oFld
nCOUNTER := 1
DEFINE DIALOG oDlg TITLE "FiveWin Dynamic folders" ;
FROM 5, 5 TO 20, 50 COLOR "N/G"
@ 0.5, 1 FOLDER oFld PROMPT "&xBase", "&And OOP", "&Power" ;
OF oDlg SIZE 160, 90
PAGE_1( oFld )
PAGE_2( oFld )
PAGE_3( oFld )
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
// ---------------------------------------------------------------------------
FUNCTION PAGE_1( oFld )
@ 1, 1 BUTTON "&Counter" OF oFld:aDialogs[ 1 ] ;
ACTION ( nCOUNTER++, MsgAlert( nCOUNTER ) )
RETURN NIL
// ---------------------------------------------------------------------------
FUNCTION PAGE_2( oFld )
@ 1, 1 BUTTON "&Counter" OF oFld:aDialogs[ 2 ] ;
ACTION ( IIF( nCounter > 1, MsgAlert( nCounter ), NIL )
// That works only on Button-click
// but i don't want to press a button to disable the browser
// i need a automatic disable of the browser on page-changing
// ---------------------------------------------------------------------
If nCounter > 1
MsgAlert( nCounter )
Endif
RETURN NIL
// ---------------------------------------------------------------------------
FUNCTION PAGE_3( oFld )
@ 1, 1 BUTTON "&Counter" OF oFld:aDialogs[ 3 ] ;
ACTION ( MsgAlert( nCOUNTER ) )
MsgAlert( nCounter )
RETURN NIL
[/code:y28nbve1]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
A ""special"" - question about folders. => solved
|
Uwe,[code:ll74mh8d]PAGE_1( oFld )
PAGE_2( oFld )
PAGE_3( oFld )
ACTIVATE DIALOG oDlg CENTERED[/code:ll74mh8d] The three functions, page_1, page_2, and page_3 are going to get called once each just before the maine dialog is activated. This is not what you want.You have to also define a dialog for each folder. The function to change the gradient has to be called from one of the controls on one of the folders. The browse you want to disable has to be a visible variable that can be accessed, then you can access it from the gradient change function.James
|
A ""special"" - question about folders. => solved
|
Hello James,I found a solution for my problem and it works perfect.[img:110879ej]http://www.pflegeplus.com/pictures/grad12a.jpg[/img:110879ej][code:110879ej]
At first, the browse-object on page 2 ( oLbx6 ) has to be static
The Switch-var < nHEADGRAD > is PRIVATE
static oWnd, oDlg, oFld, oLbx6
I used the old structure, but added ON CHANGE ( only needed for page 2 )
REDEFINE FOLDER oFld ID 110 OF oDlg FONT oProgFont ;
PROMPTS " &Header ", " &Footer ", " &Styles / Cells ", " &Data-Colors / Font ", " &Background / Bitmaps ", "Settings" ;
DIALOGS "Browse1","Browse2","Browse3","Browse4","Browse5","Browse6" ;
ON CHANGE( TEST_FOLD( nOption, nOldOption, oLbx6 ) )
FOLDER_1(oDlg,oFld,oLbx0)
FOLDER_2(oDlg,oFld,oLbx0, oRESULT0)
FOLDER_3(oDlg,oFld,oLbx0)
FOLDER_4(oDlg,oFld,oLbx0)
FOLDER_5(oDlg,oFld,oLbx0)
FOLDER_6(oDlg,oFld,oLbx0)
...
...
// --------------------- GRADIENT ON / OFF in Folder-page 1 -------------
oLbx50 := TXBrowse():New( oFld:aDialogs[1] )
oLbx50:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx50:nColDividerStyle := LINESTYLE_BLACK
oLbx50:nRowDividerStyle := LINESTYLE_BLACK
oLbx50:SetArray( aHEADGRAD )
oLbx50:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx50:aCols[ 2 ]:cHeader = Padr("Style", 20)
oLbx50:nRecSelColor = 15512898
oLbx50:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx50:bClrSel = { || { 16777215, 15512898 } }
oLbx50:lHScroll := .F.
oLbx50:lVScroll := .F.
oLbx50:lFooter := .T.
oLbx50:nFooterHeight := 15
// I get the value for < nHEADGRAD > for page 2
// and enable / disable 2 browsers in page 1
oLbx50:bLClicked := { | nRow, nCol | ( nHEADGRAD := oLbx50:nRowSel, ;
IIF( nHEADGRAD = 2, ;
( oLbx3:Disable(), oLbx5:Disable(), ;
BRW_DISABL(oLbx3), BRW_DISABL(oLbx5), ;
NEW_HPAINT(oLbx0), NEW_FPAINT(oLbx0) ), ;
( oLbx3:Enable(), oLbx5:Enable(), ;
BRW_ENABL(oLbx3), BRW_ENABL(oLbx5), ;
NEW_HPAINT(oLbx0), NEW_FPAINT(oLbx0) ) ) ) }
oLbx50:aCols[ 2 ]:AddResource("Green")
oLbx50:aCols[ 2 ]:AddResource("Red")
oLbx50:aCols[ 2 ]:bBmpData := {|| oLbx50:nArrayAt }
oLbx50:aCols[ 2 ]:bStrData := {|| oLbx50:aRow[2] }
oLbx50:nArrayAt := 1
oLbx50:nRowSel := 1
oLbx50:CreateFromResource( 150 )
//------ ENABLE / DISABLE the 1. Browser in Folderpage 2 -------//
STATIC FUNCTION TEST_FOLD( nOption, nOldOption )
IF nOption == 2
IF nHEADGRAD = 1
oLbx6:Disable()
BRW_DISABL(oLbx6)
ELSE
oLbx6:Enable()
BRW_ENABL(oLbx6)
ENDIF
ENDIF
RETURN .T.
// ------- GREY painting for DISABLED ----------------------------------
FUNCTION BRW_DISABL(oLbx)
i := 1
FOR i := 1 TO LEN(oLbx:aCols)
WITH OBJECT oLbx:aCols[i]
:bClrHeader := { || { 0, 13750737 } }
:bClrFooter := { || { 0, 13750737 } }
:bClrStd = { || { 0, 13750737 } }
END
NEXT
oLbx:Refresh()
RETURN( NIL )
// --------- WHITE painting for ENABLED --------------------------------
FUNCTION BRW_ENABL(oLbx)
i := 1
FOR i := 1 TO LEN(oLbx:aCols)
WITH OBJECT oLbx:aCols[i]
:bClrHeader := { || { 0, 16777215 } }
:bClrFooter := { || { 0, 16777215 } }
:bClrStd = { || { 0, 16777215 } }
END
NEXT
oLbx:Refresh()
RETURN( NIL )
[/code:110879ej]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
A ""special"" - question about folders. => solved
|
Uwe,Glad to hear you got it working.>The Switch-var < nHEADGRAD > is PRIVATE I would avoid PRIVATEs like the plague. Remember they are visible inside any and all functions called by code where they are visible. This includes FWH and (x)Harbour functions too.It would be better as a file-wide static. [It would be best as class data in a class.]James
|
A ""special"" - question about folders. => solved
|
James,thank you very much for your help.I think it is possible now with this version, to cover all needed visual-designs for xBrowse.There are source-results on each page.I will put them all together as a small MDI - Test-applicationwith main-window, a dialog and the created browser. Greetings from GermanyUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.