topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
resources or commands | Me too. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
responseXML | Hi, all !
I make a request to the site and want to get the DOM document
TRY
oHttp:= CreateObject( "MSXML2.XMLHTTP" )
CATCH
oHttp:= CreateObject( "microsoft.XMLHTTP" )
END
oHttp:Open( "GET", MyURL, 1)
oHttp:setRequestHeader( 'Content-type', 'text/xml')
oHttp:Send(NIL)
fl:=int(gettickcount()/1000)
do while .T.
if oHttp:readyState=4.and.oHttp:Status=200
cTxt:=oHttp:responseText
oDc:=oHttp:responseXML
exit
endif
millisec(50)
enddo
Everything works fine. oHttp:responseText returns an html text page, but the responseXML is empty. What am I doing wrong ? |
responseXML | Try with
[code=fw:7pwzt8pt]<div class="fw" id="{CB}" style="font-family: monospace;">oHttp:<span style="color: #000000;">ResponseBody</span></div>[/code:7pwzt8pt]
EMG |
responseXML | Thank you, Enrico, for your help. However responceBody returns HTML, but not the document |
responseXML | What do you mean with "the document"? XML is a text, just like html body.
EMG |
responseXML | WEB document-page website. Respobsetext/Responsebody return a html page. ResponseXML returns a DOM-compatible document page, which you can parse with DOM tools.
For example oHttp:responseXML:getElementById("ABC") |
responseXML | Ok. Try
[code=fw:3hxv2rba]<div class="fw" id="{CB}" style="font-family: monospace;">oHttp:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"GET"</span>, MyURL, .T.<span style="color: #000000;">)</span></div>[/code:3hxv2rba]
EMG |
responseXML | In fact oHttp:Open( "GET", MyURL, 1), no different from oHttp:Open( "GET", MyURL, .T.) <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
It's still not working |
responseXML | Ok. I don't know why ResponseXML it's empty, sorry. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG |
responseXML | try with: oHttp:responseText |
restar dos horas diferentes | saludos amigos, alguien tendra o habra una funcion que me de la diferencia en minutos entre 2 horas devueltas con time()
de antemano gracias |
restar dos horas diferentes | Aqui va.. espero te sirva. (tomado de un antiguo libro de librerias para clipper.....)
Salu2,,,
SET DATE ITALIAN
? DifTiempo(CTOD("01/08/91"), , CTOD("31/08/91"), "23:59" )
---> 44639
[code=fw:12zsk1mx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> DifTiempo<span style="color: #000000;">(</span>dFecha1, cHora1, dFecha2, cHora2<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> nDias, nHorasp, nMinutp, nHorasa, nMinuta, nHoras, nMinuto<br /><br /><span style="color: #00C800;">If</span> cHora1 = <span style="color: #00C800;">NIL</span> .OR. EMPTY<span style="color: #000000;">(</span>cHora1<span style="color: #000000;">)</span><br /> cHora1 := <span style="color: #ff0000;">"00:00"</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">If</span> dFecha2 = <span style="color: #00C800;">NIL</span> .OR. EMPTY<span style="color: #000000;">(</span>dFecha2<span style="color: #000000;">)</span><br /> dFecha2 := DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">If</span> Hora2 = <span style="color: #00C800;">NIL</span> .OR. EMPTY<span style="color: #000000;">(</span>cHora2<span style="color: #000000;">)</span><br /> cHora2 := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>TIME<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">5</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">IF</span> VALTYPE<span style="color: #000000;">(</span>dFecha1<span style="color: #000000;">)</span> != <span style="color: #ff0000;">"D"</span> .OR. VALTYPE<span style="color: #000000;">(</span>dFecha2<span style="color: #000000;">)</span> != <span style="color: #ff0000;">"D"</span> .OR. VALTYPE<span style="color: #000000;">(</span>cHora1<span style="color: #000000;">)</span> != <span style="color: #ff0000;">"C"</span> .OR. VALTYPE<span style="color: #000000;">(</span>cHora2<span style="color: #000000;">)</span> != <span style="color: #ff0000;">"C"</span> .OR. EMPTY<span style="color: #000000;">(</span>dFecha1<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #B900B9;">// dif de dias</span><br />nDias := dFecha2 - dFecha1<br /><span style="color: #B900B9;">// se extraen las horas y minutos de cada fraccion horaria</span><br />nHorasp := VAL<span style="color: #000000;">(</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cHora2,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nMinutp := VAL<span style="color: #000000;">(</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cHora2,<span style="color: #000000;">4</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br />nHorasa := VAL<span style="color: #000000;">(</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cHora1,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nMinuta := VAL<span style="color: #000000;">(</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span>cHora1,<span style="color: #000000;">4</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//dif de horas</span><br />nHoras := nHorasp - nHorasa<br /><span style="color: #B900B9;">// si la dif horaria es menor que 0</span><br /><span style="color: #00C800;">If</span> nHoras < <span style="color: #000000;">0</span><br /> --nDias<br /> nHoras += <span style="color: #000000;">24</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #B900B9;">// dif de minutos</span><br />nMinuto := nMinutp - nMinuta<br /><span style="color: #B900B9;">// si la dif de minutos es menor que 0</span><br /><span style="color: #00C800;">If</span> nMinuto < <span style="color: #000000;">0</span><br /> --nHoras<br /> nMinuto += <span style="color: #000000;">60</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">Return</span> nMinuto + <span style="color: #000000;">(</span>nHoras * <span style="color: #000000;">60</span><span style="color: #000000;">)</span> + <span style="color: #000000;">(</span><span style="color: #000000;">(</span>nDias* <span style="color: #000000;">24</span> <span style="color: #000000;">)</span> * <span style="color: #000000;">60</span> <span style="color: #000000;">)</span><br /><br /><br /><br /><br /><br /><br /> </div>[/code:12zsk1mx] |
restar dos horas diferentes | Gracias Willi por el código. |
restar dos horas diferentes | QAZWSX2K,
Si usas xHarbour puedes usar lo siguiente.
ElapTime( <cStartTime>, <cEndTime> ) --> cElapsedTime |
restringir acceso a las dbfs en un grupo de trabajo de XP | Hola,
Tengo el siguiente problema tengo una aplicación que trabaja en el directorio app y tiene las bases de datos en el directorio data.
El programa sirve a varios usuarios de un grupo de trabajo en Windows XP, estoy buscando la forma de protejer los archivos del directorio data, de modo que los usuarios no puedan acceder a el pero si la aplicación.
De este modo evitaría que pudieran borrar los archivos o algo así.
No he podido dar con la forma, existe alguna forma de hacerlo con Windows XP Professional.
(No hay ningún servidor, solo un grupo de trabajo).
Gracias desde ya. |
restringir acceso a las dbfs en un grupo de trabajo de XP | José:
Yo tengo la siguiente estructura
C:\CarpetaDeLaAplicacion
|_____CarpetaDeArchivos
Entonces una solución muy primitiva es asignarle la propiedad de OCULTO a la carpeta de la aplicación, ojo solo a la carpeta de la aplicacion.
Así el usuario no ve donde estan los datos, <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Saludos |
restringir acceso a las dbfs en un grupo de trabajo de XP | Este es un trabajo paraaaaaaa.... Advantage Database Server.
Con ADS no es necesario que compartas tu carpeta de datos, simplemente en tu programa pones:
AdsRightsCheck(.f.)
Y listo... a seguir funcionando. Solo compartes la carpeta del EXE pero no de los datos.
La Explicacion:
El servidor ADS corre en el servidor u equipo donde tengas tus tablas, por lo tanto es una aplicacion local a tu servidor y tiene acceso a todas las carpetas.
Los usuarios de tu programa se conectan a los datos mediante el ADS, pero no es necesario que ellos tengan acceso a los directorios, porque todo el tramite de acceso se hace via ADS.
Otro punto a favor de ADS. |
restringir acceso a las dbfs en un grupo de trabajo de XP | [quote="RF":2ce3jy77]Este es un trabajo paraaaaaaa.... Advantage Database Server.
Con ADS no es necesario que compartas tu carpeta de datos, simplemente en tu programa pones:
AdsRightsCheck(.f.)
Y listo... a seguir funcionando. Solo compartes la carpeta del EXE pero no de los datos.
La Explicacion:
El servidor ADS corre en el servidor u equipo donde tengas tus tablas, por lo tanto es una aplicacion local a tu servidor y tiene acceso a todas las carpetas.
Los usuarios de tu programa se conectan a los datos mediante el ADS, pero no es necesario que ellos tengan acceso a los directorios, porque todo el tramite de acceso se hace via ADS.
Otro punto a favor de ADS.[/quote:2ce3jy77]
Master, tengo pendiente su respuesta a un e-mail que le mandé!
Cuando Ud. pueda haga recuerdo del mismo, jeje.
Que estoy esperando novedades <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
reto para Antonio y los expertos en C | Hola Antonio,
No se si sabes que Microsoft liberó el código fuente de Word 1.1 con fines educativos:
[url:24ugy1mz]https://computerhistory.org/blog/microsoft-word-for-windows-1-1a-source-code/[/url:24ugy1mz]
[url:24ugy1mz]https://github.com/BlastarIndia/msword[/url:24ugy1mz]
A mi el C se me escapa, pero igual podías echarle un ojo a ver si se puede compilar. ¿Qué te parece?
Un saludo |
retomo Tree pasar de item en item | Hola.
Tengo un Arbol con sus ramas. ese arbol lo guardo en oTree
ahora quiero ir opsicionandome item a item, como lo hago? |
retrieve excel headers | Hello,
I am reading an Excel Sheet as follows:
oRange := GetExcelRange( ExePath() + "test.xls" )
@ 0,0 XBROWSE oBrw OF oWnd AUTOCOLS ;
DATASOURCE oRange CELL LINES FOOTERS ;
SIZES 80, 80, 80, 80
How can I get Excel´s header names?.
Thanks. |
retrieve excel headers | If you know the first row of the range contains headers, you can extract them
oHead := oRange:Rows( 1 )
oHead is a single row object representing the first row of oRange.
May I know what is your exact requirement? |
retrieve excel headers | Mr. Rao,
Thanks for reply.
I want to xBrowse an Excel and I want to set Excel headers in xBrowse.
This is my code:
[code=fw:35kfbhyg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw, oBar, oFont, n<br /> <span style="color: #00C800;">local</span> oRange, u<br /> <span style="color: #00C800;">local</span> oSheet<br /> <span style="color: #00C800;">local</span> nRow, nCol, nRows, nCols, xValue<br /><br /> <span style="color: #00C800;">local</span> cHeaders := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> nSizes := <span style="color: #000000;">{</span> <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">140</span> <span style="color: #000000;">}</span><br /><br /><br /><br /> SET DATE ITALIAN<br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /><br /> <span style="color: #B900B9;">//fwNumFormat( 'E', .t. )</span><br /><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowse Excel Sheet"</span><br /> oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #000000;">2007</span><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">''</span> <span style="color: #000000;">2007</span><br /><br /><br /><br /><br /> oRange := GetExcelRange<span style="color: #000000;">(</span> ExePath<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"test.xls"</span> <span style="color: #000000;">)</span><br /><br /><br /> <br /> oSheet := oRange:<span style="color: #000000;">WorkSheet</span><br /> nRows := oSheet:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Rows</span>:<span style="color: #0000ff;">Count</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> nCols := oSheet:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Columns</span>:<span style="color: #0000ff;">Count</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">For</span> nRow := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nRows<br /> <span style="color: #00C800;">FOR</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCols<br /> xValue := oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">(</span>nRow,nCol<span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> <span style="color: #00C800;">if</span> xValue = <span style="color: #00C800;">nil</span><br /> oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">(</span>nRow,nCol<span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">(</span><span style="color: #ff0000;">" "</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// replace nil with space</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">Next</span> I<br /><br /><br /><br /><br /><br /><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">AUTOCOLS</span> ;<br /> DATASOURCE oRange CELL LINES FOOTERS ;<br /> HEADERS cHeaders ;<br /> SIZES nSizes<br /><br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br /><br /><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /> oRange:<span style="color: #000000;">WorkSheet</span>:<span style="color: #000000;">Parent</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span>.F.<span style="color: #000000;">)</span> <span style="color: #B900B9;">// Not save changes</span><br /><br /><br /><br /><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> ExePath<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> cFilePath<span style="color: #000000;">(</span> GetModuleFileName<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:35kfbhyg] |
retrieve file date and time for a Internet file | Hi,
Is it possible to obtain the date and time from a file in <!-- m --><a class="postlink" href="http://www.google.com/files/update.exe">http://www.google.com/files/update.exe</a><!-- m -->?
Thank you. |
retrieve file date and time for a Internet file | Something like this:
[code=fw:2xicz7fz]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">Public</span> <span style="color: #00C800;">Function</span> GetRemoteFilenameTimestamp<span style="color: #000000;">(</span>ByVal address As Uri<span style="color: #000000;">)</span> As Date<br /><br /> Dim request As System.Net.HttpWebRequest<br /> Dim response As System.Net.HttpWebResponse = Nothing<br /> Dim dat As Date<br /><br /> <span style="color: #00C800;">Try</span><br /> <span style="color: #ff0000;">' Create the web request <br /> request = DirectCast(System.Net.WebRequest.Create(address), System.Net.HttpWebRequest)<br /><br /> '</span> <span style="color: #0000ff;">Get</span> response <br /> response = DirectCast<span style="color: #000000;">(</span>request.GetResponse<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, System.Net.HttpWebResponse<span style="color: #000000;">)</span><br /> dat = response.Headers.Item<span style="color: #000000;">(</span><span style="color: #ff0000;">"Last-Modified"</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #ff0000;">'response.Headers.Item("Content-Length")<br /><br /> Finally<br /> If Not response Is Nothing Then response.Close()<br /> End Try<br /><br /> Return dat<br /><br /> End Function</span></div>[/code:2xicz7fz] |
returning a wchar_t variable back to harbour function | Hello everyone!
Inside a harbour wrapper function I need to declared a variable as wchar_t or HB_WCHAR but I don't know how to return that variable back to calling harbour function. I tried using hb_retc as with any other string but that won't return wide strings. Is there another vm return function I can use to return HB_WCHAR variables?
Thank you,
Reinaldo. |
returning a wchar_t variable back to harbour function | This is how FWH returns Wide Strings.
[code=fw:31dwzloh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//also include</span><br /><span style="color: #00D7D7;">#include</span> <fwh.h> <span style="color: #B900B9;">// fwh\include folder</span><br /><span style="color: #B900B9;">//</span><br />LPWSTR cWideStr;<br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//</span><br />fw_retWide<span style="color: #000000;">(</span> cWideStr <span style="color: #000000;">)</span>;<br /><span style="color: #B900B9;">//</span><br /> </div>[/code:31dwzloh] |
returning a wchar_t variable back to harbour function | Hello Mr. Rao and everyone else;
Your information is valuable to me but this is a different situation.
I'm sorry I should have been more specific. I'm trying to return a c wchar_t variable type from a VM Harbour wrapper c function back to the calling Harbour (clipper) code.
[code=fw:3q7eh0ln]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> OCRFROMFILEUSINGTRANSYM <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> TOCRJOBINFO_EG JobInfo_EG;<br /> TOCRRESULTSEX_EG* Results = <span style="color: #000000;">0</span>;<br /> long Status;<br /> long JobNo = <span style="color: #000000;">0</span>;<br /> byte OptionsMask = HB_ISNUM<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> ? hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> : 0x00000000 ;<br /> long Orientation = HB_ISNUM<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> ? hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> : <span style="color: #000000;">TOCRJOBORIENT_AUTO</span>; <br /> long ErrorMode = HB_ISNUM<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span> ? hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span> : <span style="color: #000000;">TOCRERRORMODE_LOG</span> ; <br /> HB_WCHAR Msg<span style="color: #000000;">[</span><span style="color: #000000;">10240</span><span style="color: #000000;">]</span>; <span style="color: #B900B9;">//<==Wide string that I later want to return</span><br /> char * InputFile = <span style="color: #000000;">(</span> char * <span style="color: #000000;">)</span> hb_parcx<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">//parm 1 is input file</span><br /> FILE* logfile ; <br /> time_t currentTime;<br /> char timeString<span style="color: #000000;">[</span><span style="color: #000000;">100</span><span style="color: #000000;">]</span>;<br /><br /><br />...<br /><br /> hb_retc<span style="color: #000000;">(</span> Msg <span style="color: #000000;">)</span> ; <span style="color: #B900B9;">// <== this won't work as hb_retc only returns static char * types. </span><br /> </div>[/code:3q7eh0ln]
So either the VM has another way to return a wide string back to Harbour or I will have to convert that wide string but that is something I rather not do. On all my wrappers I had ignored wide strings. But now I realize I will have to fix that but wide strings a new to me.
Thank you. |
returning a wchar_t variable back to harbour function | Even in this case
[code=fw:2h46ve32]<div class="fw" id="{CB}" style="font-family: monospace;">fw_retWide<span style="color: #000000;">(</span> cMsg <span style="color: #000000;">)</span></div>[/code:2h46ve32]
will work, as long as we are working with Windows OS.
Please try.
You need to include "<fwh.h>"
Or please give me some sample that we can try at our end to test. |
returning a wchar_t variable back to harbour function | Yes, Mr. Rao, it does work.
I followed the header file down into getfile.c and saw how it is being done and why it works. It is a good learning experience for me.
Thank you very much, |
revisando fivelinux | Con fines didacticos he intentado instalar y hacer funcionar el fivelinux-gpl .
El primer paso fué descargar harbour del repositorio y construir sus librerías .
Segundo paso descargar la ultima version de fivelinux y construir sus librerias .
1º problema al compilar database.prg no encuentra el include hbcompat.ch . Este no está dentro del repositorio de harbour .Supongo que podre usar el hbcompat.ch de harbour para bcc de windows , pero sería bueno no tificarlo al grupo de desarrollo de harbour para linux o en su defecto incluirlo detro de fivelinux.
2ºProblema demtro del mismo archivo makefile vienen los comandos para compilar con harbour y con xharbour sería bueno poner una variable de ambiente que distingua con que compilador trabajamos.
Saludos. |
revisando fivelinux | Manuel,
hbcompat.ch pertenece a Harbour, está en harbour/contrib/xhb/
El makefile, efectivamente, usa Harbour y xHarbour, la idea es borrar la parte que no se use, aunque seria mejor como indicas, que fuese facilmente configurable |
revisando fivelinux | Manuel,
El diseñador de ventanas, fiveform.prg, con FiveLinux, ya va tomando forma y acercándose a los de FiveWin y FiveMac <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Una delicia... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
revisando fivelinux | he intentado con este makefile que a mi para harbour me funciona bien . Seria bueno probarlo con xharbour.
[code=fw:3byh5b8k]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /># FiveLinux makefile<br /><br />HB_COMPILER:= harbour<br /><br />all : ./lib/libfive.a ./lib/libfivec.a<br /><br />ifneq <span style="color: #000000;">(</span>$<span style="color: #000000;">(</span>HB_COMPILER<span style="color: #000000;">)</span>,xharbour<span style="color: #000000;">)</span><br />PRG_OBJS = ./obj/bar.o \<br /> ./obj/<span style="color: #0000ff;">button</span>.o \<br /> ./obj/<span style="color: #0000ff;">checkbox</span>.o \<br /> ./obj/<span style="color: #0000ff;">combobox</span>.o \<br /> ./obj/control.o \<br /> ./obj/database.o \<br /> ./obj/dbtools.o \<br /> ./obj/<span style="color: #0000ff;">dialog</span>.o \<br /> ./obj/errsys.o \<br /> ./obj/file.o \<br /> ./obj/filename.o \<br /> ./obj/<span style="color: #0000ff;">folder</span>.o \<br /> ./obj/<span style="color: #0000ff;">font</span>.o \<br /> ./obj/form.o \<br /> ./obj/<span style="color: #0000ff;">get</span>.o \<br /> ./obj/group.o \<br /> ./obj/harbour.o \<br /> ./obj/<span style="color: #0000ff;">image</span>.o \<br /> ./obj/ini.o \<br /> ./obj/<span style="color: #0000ff;">listbox</span>.o \<br /> ./obj/memoedit.o \<br /> ./obj/<span style="color: #0000ff;">menu</span>.o \<br /> ./obj/<span style="color: #0000ff;">menuitem</span>.o \<br /> ./obj/mget.o \<br /> ./obj/msgbar.o \<br /> ./obj/pdmenu.o \<br /> ./obj/<span style="color: #0000ff;">printer</span>.o \<br /> ./obj/progres.o \<br /> ./obj/<span style="color: #0000ff;">radio</span>.o \<br /> ./obj/radmenu.o \<br /> ./obj/<span style="color: #0000ff;">say</span>.o \<br /> ./obj/scrollbar.o \<br /> ./obj/<span style="color: #0000ff;">timer</span>.o \<br /> ./obj/valblank.o \<br /> ./obj/wbrowse.o \<br /> ./obj/wbcolumn.o \<br /> ./obj/<span style="color: #0000ff;">window</span>.o<br /><span style="color: #00C800;">else</span><br />PRGX_OBJS = ./objx/bar.o \<br /> ./objx/<span style="color: #0000ff;">button</span>.o \<br /> ./objx/<span style="color: #0000ff;">checkbox</span>.o \<br /> ./objx/<span style="color: #0000ff;">combobox</span>.o \<br /> ./objx/control.o \<br /> ./objx/<span style="color: #0000ff;">dialog</span>.o \<br /> ./objx/errsys.o \<br /> ./objx/file.o \<br /> ./objx/<span style="color: #0000ff;">folder</span>.o \<br /> ./objx/<span style="color: #0000ff;">font</span>.o \<br /> ./objx/form.o \<br /> ./objx/<span style="color: #0000ff;">get</span>.o \<br /> ./objx/group.o \<br /> ./objx/harbour.o \<br /> ./objx/<span style="color: #0000ff;">image</span>.o \<br /> ./objx/<span style="color: #0000ff;">listbox</span>.o \<br /> ./objx/<span style="color: #0000ff;">menu</span>.o \<br /> ./objx/<span style="color: #0000ff;">menuitem</span>.o \<br /> ./objx/mget.o \<br /> ./objx/msgbar.o \<br /> ./objx/pdmenu.o \<br /> ./objx/<span style="color: #0000ff;">printer</span>.o \<br /> ./objx/progres.o \<br /> ./objx/<span style="color: #0000ff;">radio</span>.o \<br /> ./objx/radmenu.o \<br /> ./objx/<span style="color: #0000ff;">say</span>.o \<br /> ./objx/scrollbar.o \<br /> ./objx/<span style="color: #0000ff;">timer</span>.o \<br /> ./objx/valblank.o \<br /> ./objx/wbrowse.o \<br /> ./objx/wbcolumn.o \<br /> ./objx/<span style="color: #0000ff;">window</span>.o<br /><br /><span style="color: #00C800;">endif</span><br /><br />C_OBJS = ./objc/bars.o \<br /> ./objc/buttons.o \<br /> ./objc/checkboxes.o \<br /> ./objc/comboboxes.o \<br /> ./objc/<span style="color: #0000ff;">dialogs</span>.o \<br /> ./objc/files.o \<br /> ./objc/folders.o \<br /> ./objc/fonts.o \<br /> ./objc/getcolor.o \<br /> ./objc/getfile.o \<br /> ./objc/getfont.o \<br /> ./objc/gets.o \<br /> ./objc/groups.o \<br /> ./objc/<span style="color: #0000ff;">images</span>.o \<br /> ./objc/listboxes.o \<br /> ./objc/lnx.o \<br /> ./objc/menus.o \<br /> ./objc/mgets.o \<br /> ./objc/mouse.o \<br /> ./objc/msgbars.o \<br /> ./objc/msgbox.o \<br /> ./objc/printers.o \<br /> ./objc/<span style="color: #0000ff;">progress</span>.o \<br /> ./objc/radios.o \<br /> ./objc/says.o \<br /> ./objc/scrollbars.o \<br /> ./objc/spawn.o \<br /> ./objc/strtoken.o \<br /> ./objc/wbrowses.o \<br /> ./objc/windows.o<br /><br />./lib/libfive.a : $<span style="color: #000000;">(</span>PRG_OBJS<span style="color: #000000;">)</span><br /><br />ifneq <span style="color: #000000;">(</span>$<span style="color: #000000;">(</span>HB_COMPILER<span style="color: #000000;">)</span>,xharbour<span style="color: #000000;">)</span><br /><br /> ./lib/libfivec.a : $<span style="color: #000000;">(</span>C_OBJS<span style="color: #000000;">)</span><br /><br />./obj/%.c : ./source/classes/%.prg<br /> ./../harbour/bin/harbour $< -o./$@ -n -I./../harbour/include -I./include<br /><br />./obj/%.c : ./source/<span style="color: #00C800;">function</span>/%.prg<br /> ./../harbour/bin/harbour $< -o./$@ -n -I./../harbour/include -I./include<br /><br /><br />./obj/%.o : ./obj/%.c<br /> gcc -c -D_HARBOUR_ -o $@ -I./../harbour/include -I./include $<<br /> ar rc ./lib/libfive.a $@<br /><br /><span style="color: #00C800;">else</span><br /><br /> ./lib/libfivex.a : $<span style="color: #000000;">(</span>PRGX_OBJS<span style="color: #000000;">)</span><br /><br />./objx/%.c : ./source/classes/%.prg<br /> ./../xharbour/bin/harbour $< -o./$@ -n -I./../xharbour/include -I./include<br /><br />./objx/%.c : ./source/<span style="color: #00C800;">function</span>/%.prg<br /> ./../xharbour/bin/harbour $< -o./$@ -n -I./../xharbour/include -I./include<br /><br />./objx/%.o : ./objx/%.c<br /> gcc -c -o $@ -I./../xharbour/include $<<br /> ar rc ./lib/libfivex.a $@<br /><br /><span style="color: #00C800;">endif</span><br /><br /><br /><br />./objc/%.o : ./source/<span style="color: #00C800;">function</span>/%.c<br /> gcc -D_HARBOUR_ `pkg-config --cflags gtk+<span style="color: #000000;">-2.0</span>` `pkg-config --cflags libgnomeprintui<span style="color: #000000;">-2.2</span>` -I./../harbour/include -I./include -Wall -c -o $@ $<<br /> ar rc ./lib/libfivec.a $@<br /><br />./objc/%.o : ./source/winapi/%.c<br /> gcc -D_HARBOUR_ `pkg-config --cflags gtk+<span style="color: #000000;">-2.0</span>` `pkg-config --cflags libgnomeprintui<span style="color: #000000;">-2.2</span>` -I./../harbour/include -I./include -Wall -c -o $@ $<<br /> ar rc ./lib/libfivec.a $@<br /><br />./objc/%.o : ./source/internal/%.c<br /> gcc -D_HARBOUR_ `pkg-config --cflags gtk+<span style="color: #000000;">-2.0</span>` `pkg-config --cflags libglade<span style="color: #000000;">-2.0</span>` -I./../harbour/include -I./include -Wall -c -o $@ $<<br /> ar rc ./lib/libfivec.a $@<br /> </div>[/code:3byh5b8k] |
revisando fivelinux | viendo un poco como va el tema de añadir funcionalidades a los controles he metido este codigo que parece que funciona :
Para say :
[code=fw:2t1y9srf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />en says.c <br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> SAYSETANGLE <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> GtkWidget * hWnd = <span style="color: #000000;">(</span> GtkWidget * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> GList * children = gtk_container_get_children<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> GtkContainer * <span style="color: #000000;">)</span> hWnd <span style="color: #000000;">)</span>;<br /> gtk_label_set_angle<span style="color: #000000;">(</span> children->data , hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />en <span style="color: #0000ff;">say</span>.prg<br /> <span style="color: #00C800;">METHOD</span> setangle<span style="color: #000000;">(</span>nAngle<span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> SaySetAngle<span style="color: #000000;">(</span>::<span style="color: #000000;">hWnd</span>,nAngle<span style="color: #000000;">)</span><br /><br /> </div>[/code:2t1y9srf]
para meter:
[code=fw:2t1y9srf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />en <span style="color: #0000ff;">progress</span>.c <br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> PROSETVERTICAL <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> GtkWidget * hWnd = <span style="color: #000000;">(</span> GtkWidget * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /><br /> gtk_progress_bar_set_orientation<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> GtkProgressBar * <span style="color: #000000;">)</span> hWnd, GTK_PROGRESS_BOTTOM_TO_TOP <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />en progres.prg<br /><br /> <span style="color: #00C800;">METHOD</span> SetVertical<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> ProSetVertical<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /><br /><br /> </div>[/code:2t1y9srf] |
revisando fivelinux | Manuel,
Veo que te estas animando, bien! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Si te parece te doy de alta en el proyecto FiveLinux en Google code y asi puedes subir tu código directamente.
gracias!
Editado: ya estás dado de alta. Bienvenido y gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
rewrite dbf01.prg using code | I am trying to rewrite the sample dbf01.prg from code not from resources but I face problem with dlg:update() as no change hapnneded with buttons change and with settext() method I have syntax error.
[code:ki8r9c3y]
// FiveWin - DataBase Objects Tutorial - 01
// FiveWin DataBase tools
#include "FiveWin.ch"
#include "Dbfown.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
SET _3DLOOK ON
DEFINE WINDOW oWnd FROM 2, 2 TO 20, 70 ;
TITLE "Testing DataBase Objects" ;
MENU BuildMenu()
SET MESSAGE OF oWnd ;
TO "FiveWin - Object Oriented DataBase Management" CENTERED
oWnd:bLDblClick = { || MsgInfo( "Double Left Click" ) }
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID MsgYesNo( "Do you really want to end ?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Clients"
MENU
MENUITEM "&Record by Record..." ACTION ClientsRec() ;
MESSAGE "Clients record by record management dialog"
MENUITEM "&Browse..." ACTION ClientsBrowse() ;
MESSAGE "Clients browse management dialog"
SEPARATOR
MENUITEM "&Exit Test..." ACTION oWnd:End() ;
MESSAGE "End doing this tutorial"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function ClientsRec()
local oDbf, oDlg
local oBtnNew:="&New", oBtnTop:="&Top", ;
oBtnPrev:="&Previous", oBtnNext:="&Next", oBtnBottom:="&bottom", oBtnEnd:="&End"
local aButtons
local lNew := .f.
USE Customer
DATABASE oDbf // We create a DBF Object based on the current Alias
// Now we can change WorkArea and the DBF Object
// automatically access its area !
oDbf:bEoF = nil // We don't want default EOF processing
DEFINE DIALOG oDlg FROM 8, 2 TO 600, 700 PIXEL ;
TITLE ("Customer" )
@ 1,2 SAY "&First" OF oDlg PIXEL
@ 1,50 SAY ":" OF oDlg PIXEL
@ 1,60 GET oDbf:First OF oDlg PIXEL
@ 15,1 SAY "&Name" OF oDlg PIXEL
@ 15,50 SAY ":" OF oDlg PIXEL
@ 15,60 GET oDbf:Last OF oDlg PIXEL
@ 280, 10 BUTTON oBtnNew OF oDlg PIXEL SIZE 30, 12 ;
ACTION New( @lNew, oDbf, aButtons, oDlg ) ;
MESSAGE "Add a new customer"
@ 280, 50 BUTTON oBtnTop OF oDlg PIXEL SIZE 30, 12 ;
ACTION Top( @lNew, oDbf, aButtons, oDlg ) ;
MESSAGE "Go to the first record of the DataBase"
@ 280, 100 BUTTON oBtnPrev OF oDlg PIXEL SIZE 30, 12 ;
ACTION ( oDbf:Skip( -1 ), oDlg:Update() ) ;
MESSAGE "Go to the previous record of the DataBase"
@ 280, 150 BUTTON oBtnNext OF oDlg PIXEL SIZE 30, 12 ;
ACTION ( oDbf:Skip(),;
If( oDbf:Eof(), ( MsgStop( "EoF" ), oDbf:GoBottom() ),;
oDlg:Update() ) ) ;
MESSAGE "Go to the next record of the DataBase"
@ 280, 200 BUTTON oBtnBottom OF oDlg PIXEL SIZE 30, 12 ;
ACTION ( oDbf:GoBottom(), oDlg:Update() ) ;
MESSAGE "Go to the last record of the DataBase"
@ 280, 250 BUTTON oBtnEnd OF oDlg PIXEL SIZE 30, 12 ;
ACTION oDlg:End() ;
MESSAGE "End this dialog"
aButtons = { oBtnNew, oBtnTop, oBtnPrev, oBtnNext, oBtnBottom, oBtnEnd }
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oDlg:Update() )
USE
return nil
//----------------------------------------------------------------------------//
function New( lNew, oDbf, aButtons, oDlg )
local n
if ! lNew
aButtons[ 1 ]:SetText( "&Save" )
aButtons[ 2 ]:SetText( "&Cancel" )
for n = 3 to Len( aButtons )
aButtons[ n ]:Disable()
next
oDbf:Blank() // we 'clean' the DataBase buffer
oDlg:Update() // we refresh the controls
oDlg:aControls[ 1 ]:SetFocus() // we give focus to the first GET
else
oDbf:Append() // The user selected 'save'
oDbf:Save() // we copy from the DataBase buffer into the 'real' DBF
aButtons[ 1 ]:SetText( "&New" )
aButtons[ 2 ]:SetText( "&Top" )
for n = 3 to Len( aButtons )
aButtons[ n ]:Enable()
next
endif
lNew = ! lNew // we toggle the lNew value
return nil
//----------------------------------------------------------------------------//
function Top( lNew, oDbf, aButtons, oDlg )
local n
if ! lNew // the user wants to GO TOP
oDbf:GoTop()
oDlg:Update() // we repaint the controls containts
else // the user canceled the 'New' option
oDbf:Load() // reload again fields info from the DBF
oDlg:Update() // we repaint the controls contains
aButtons[ 1 ]:SetText( "&New" )
aButtons[ 2 ]:SetText( "&Top" )
for n = 3 to Len( aButtons )
aButtons[ n ]:Enable()
next
lNew = .f.
endif
return nil
//----------------------------------------------------------------------------//
function ClientsBrowse()
local oDlg, oDbf, oBrw, oFnt
USE customer
DATABASE oDbf
DEFINE DIALOG oDlg RESOURCE "Browse"
REDEFINE LISTBOX oBrw ;
FIELDS oDbf:first, oDbf:last ;
HEADERS "first", "last" ;
SIZES 250, 300 ;
ID 110 OF oDlg
// We change the skip codeblock of the browse, to be managed
// by the DataBase object skip method, so we can directly use
// oDbf:Name and oDbf:Adress in the above FIELDS ... clause
oBrw:bSkip = { | nRecs | oDbf:Skipper( nRecs ) }
oBrw:lAutoEdit = .T.
oBrw:cToolTip = "This is a test"
ACTIVATE DIALOG oDlg CENTERED
USE
return nil
//----------------------------------------------------------------------------//
procedure AppSys // XBase++ requirement
return
//----------------------------------------------------------------------------//
[/code:ki8r9c3y] |
rewrite dbf01.prg using code | Ehab,
This is the right way to do it:
[code:2cca3v1m]
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
SET _3DLOOK ON
DEFINE WINDOW oWnd FROM 2, 2 TO 20, 70 ;
TITLE "Testing DataBase Objects" ;
MENU BuildMenu()
SET MESSAGE OF oWnd ;
TO "FiveWin - Object Oriented DataBase Management" CENTERED
oWnd:bLDblClick = { || MsgInfo( "Double Left Click" ) }
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID MsgYesNo( "Do you really want to end ?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Clients"
MENU
MENUITEM "&Record by Record..." ACTION ClientsRec() ;
MESSAGE "Clients record by record management dialog"
MENUITEM "&Browse..." ACTION ClientsBrowse() ;
MESSAGE "Clients browse management dialog"
SEPARATOR
MENUITEM "&Exit Test..." ACTION oWnd:End() ;
MESSAGE "End doing this tutorial"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function ClientsRec()
local oDbf, oDlg
local oBtnNew, oBtnTop, oBtnPrev, oBtnNext, oBtnBottom, oBtnEnd
local aButtons
local lNew := .f.
USE Customer
DATABASE oDbf // We create a DBF Object based on the current Alias
// Now we can change WorkArea and the DBF Object
// automatically access its area !
oDbf:bEoF = nil // We don't want default EOF processing
DEFINE DIALOG oDlg FROM 8, 2 TO 600, 700 PIXEL ;
TITLE ("Customer" )
@ 1,2 SAY "&First" OF oDlg PIXEL
@ 1,50 SAY ":" OF oDlg PIXEL
@ 1,60 GET oDbf:First OF oDlg PIXEL UPDATE
@ 15,1 SAY "&Name" OF oDlg PIXEL
@ 15,50 SAY ":" OF oDlg PIXEL
@ 15,60 GET oDbf:Last OF oDlg PIXEL UPDATE
@ 280, 10 BUTTON oBtnNew PROMPT "&New" OF oDlg PIXEL SIZE 30, 12 ;
ACTION New( @lNew, oDbf, aButtons, oDlg ) ;
MESSAGE "Add a new customer"
@ 280, 50 BUTTON oBtnTop PROMPT "&Top" OF oDlg PIXEL SIZE 30, 12 ;
ACTION Top( @lNew, oDbf, aButtons, oDlg ) ;
MESSAGE "Go to the first record of the DataBase"
@ 280, 100 BUTTON oBtnPrev PROMPT "&Previous" OF oDlg PIXEL SIZE 30, 12 ;
ACTION ( oDbf:Skip( -1 ), oDlg:Update() ) ;
MESSAGE "Go to the previous record of the DataBase"
@ 280, 150 BUTTON oBtnNext PROMPT "&Next" OF oDlg PIXEL SIZE 30, 12 ;
ACTION ( oDbf:Skip(),;
If( oDbf:Eof(), ( MsgStop( "EoF" ), oDbf:GoBottom() ),;
oDlg:Update() ) ) ;
MESSAGE "Go to the next record of the DataBase"
@ 280, 200 BUTTON oBtnBottom PROMPT "&Bottom" OF oDlg PIXEL SIZE 30, 12 ;
ACTION ( oDbf:GoBottom(), oDlg:Update() ) ;
MESSAGE "Go to the last record of the DataBase"
@ 280, 250 BUTTON oBtnEnd PROMPT "&End" OF oDlg PIXEL SIZE 30, 12 ;
ACTION oDlg:End() ;
MESSAGE "End this dialog"
aButtons := { oBtnNew, oBtnTop, oBtnPrev, oBtnNext, oBtnBottom, oBtnEnd }
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oDlg:Update() )
USE
return nil
//----------------------------------------------------------------------------//
function New( lNew, oDbf, aButtons, oDlg )
local n
if ! lNew
aButtons[ 1 ]:SetText( "&Save" )
aButtons[ 2 ]:SetText( "&Cancel" )
for n = 3 to Len( aButtons )
aButtons[ n ]:Disable()
next
oDbf:Blank() // we 'clean' the DataBase buffer
oDlg:Update() // we refresh the controls
oDlg:aControls[ 1 ]:SetFocus() // we give focus to the first GET
else
oDbf:Append() // The user selected 'save'
oDbf:Save() // we copy from the DataBase buffer into the 'real' DBF
aButtons[ 1 ]:SetText( "&New" )
aButtons[ 2 ]:SetText( "&Top" )
for n = 3 to Len( aButtons )
aButtons[ n ]:Enable()
next
endif
lNew = ! lNew // we toggle the lNew value
return nil
//----------------------------------------------------------------------------//
function Top( lNew, oDbf, aButtons, oDlg )
local n
if ! lNew // the user wants to GO TOP
oDbf:GoTop()
oDlg:Update() // we repaint the controls containts
else // the user canceled the 'New' option
oDbf:Load() // reload again fields info from the DBF
oDlg:Update() // we repaint the controls contains
aButtons[ 1 ]:SetText( "&New" )
aButtons[ 2 ]:SetText( "&Top" )
for n = 3 to Len( aButtons )
aButtons[ n ]:Enable()
next
lNew = .f.
endif
return nil
//----------------------------------------------------------------------------//
function ClientsBrowse()
local oDlg, oDbf, oBrw, oFnt
USE customer
DATABASE oDbf
DEFINE DIALOG oDlg RESOURCE "Browse"
REDEFINE LISTBOX oBrw ;
FIELDS oDbf:first, oDbf:last ;
HEADERS "first", "last" ;
SIZES 250, 300 ;
ID 110 OF oDlg
// We change the skip codeblock of the browse, to be managed
// by the DataBase object skip method, so we can directly use
// oDbf:Name and oDbf:Adress in the above FIELDS ... clause
oBrw:bSkip = { | nRecs | oDbf:Skipper( nRecs ) }
oBrw:lAutoEdit = .T.
oBrw:cToolTip = "This is a test"
ACTIVATE DIALOG oDlg CENTERED
USE
return nil
//----------------------------------------------------------------------------//
[/code:2cca3v1m] |
rewrite dbf01.prg using code | Sorry I also rewrite the ClientsBrowse() with error :
No exported method: BLCLICKED
[code:18d2bk88]
function ClientsBrowse()
local oDlg, oDbf, oBrw, oFnt
USE customer
DATABASE oDbf
@ 10,20 LISTBOX oBrw;
FIELDS oDbf:first, oDbf:last ;
HEADERS "first", "last" ;
SIZE 250, 300 of oDlg
// We change the skip codeblock of the browse, to be managed
// by the DataBase object skip method, so we can directly use
// oDbf:Name and oDbf:Adress in the above FIELDS ... clause
oBrw:bSkip = { | nRecs | oDbf:Skipper( nRecs ) }
oBrw:lAutoEdit = .T.
oBrw:cToolTip = "This is a test"
ACTIVATE DIALOG oDlg CENTERED
USE
return nil
[/code:18d2bk88] |
rewrite dbf01.prg using code | You are missing DEFINE DIALOG. This is the right code:
[code:2wxnbjxd]
function ClientsBrowse()
local oDlg, oDbf, oBrw, oFnt
USE customer
DATABASE oDbf
DEFINE DIALOG oDlg FROM 5, 5 TO 20, 80 TITLE "Browse"
@ 1, 2 LISTBOX oBrw;
FIELDS oDbf:first, oDbf:last ;
HEADERS "first", "last" ;
SIZE 250, 100 of oDlg
// We change the skip codeblock of the browse, to be managed
// by the DataBase object skip method, so we can directly use
// oDbf:Name and oDbf:Adress in the above FIELDS ... clause
oBrw:bSkip = { | nRecs | oDbf:Skipper( nRecs ) }
oBrw:lAutoEdit = .T.
oBrw:cToolTip = "This is a test"
ACTIVATE DIALOG oDlg CENTERED
USE
return nil
[/code:2wxnbjxd] |
rfc 4648 y rfc 1321 | Hola que tal:
Necesitaría aplicar a un archivo zip el algoritmo estándar MD5 (rfc. 1321) y a otro archivo ZIP pasarlo a código Base64 (rfc 4648).
Alguien podría ayudarme.
Un saludo
Gracias
Carlos |
ribbon - round button | Sr. Antonio, é possível adicionar um round button como postado abaixo?
viewtopic.php?f=3&t=17636&p=92095&hilit=ribbon#p92095 |
ribbon - round button | SGS
[url:1qilpt5a]http://forums.fivetechsupport.com/viewtopic.php?p=84673#p84673[/url:1qilpt5a]
[url:1qilpt5a]http://forums.fivetechsupport.com/viewtopic.php?p=91426#p91426[/url:1qilpt5a] |
ribbon - round button | Daniel,
Muito obrigado |
ribbon object | can I insert a get and date pick on a group of ribbon ? |
ribbon object | For me it is working.
This is my code:
@ 2,20 GET oSay VAR cFind OF oGruppe PIXEL SIZE 100,16
oGruppe is the ribbon group
Best regards,
Otto |
ribbon object | thanks |
ribbon+oPanel+Xbrowse+TASKPANEL | Amigo estoy usando este codigo pero al mostrar el xbrowse se queda pegado
no hace nada:
FUNCTION WINGES01()
LOCAL oBrow
LOCAL oDlg, oLbx
LOCAL oFnt
LOCAL nW, nH
LOCAL cPersonalca:=Space(60)
LOCAL oGet
LOCAL cVar, oCbx, cHelp,oCbx1
LOCAL oBar, oPop, oIcon, cTit
LOCAL oBtn, aX[6], aIdx:={},oCol
Local oWnd,oPanel
aIdx:={"por Codigo","por Nombre"}
cTit:="Datos de las Personales"
oPanel := TPanel():New( 0, 0, 0, 0, oVentPrinc)
oPanel:Hide()
if oVentPrinc:oClient <> NIL
oVentPrinc:oClient:Hide()
oVentPrinc:oClient := nil
endif
oVentPrinc:oClient := oPanel
cPersonal:=XServer:Query("SELECT * FROM personal ORDER BY cod_personal")
cPersonal:GoTop()
@ 0, 0 XBROWSE oLbx FIELDS cPersonal:Cod_personal,cPersonal:Nom_Personal,cPersonal:Rut_Personal,cPersonal:Dir_Personal,cPersonal:Ciu_Personal,cPersonal:Car_Personal,cPersonal:Com_Personal;
HEADERS "Codigo","Nombre","R.U.T.","Direccion","Ciudad","Cargo","Comision" ;
FIELDSIZES 80,250,90,200,150,150,50;
OF oPanel //WChld
SetDolphin( oLbx, cPersonal,.f. )
oLbx:bLDblClick := { |nRow,nCol,nKeyFlags|(GetPersonal(.F.,oLbx),oLbx:Refresh())}
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx:nColDividerStyle := LINESTYLE_RAISED
oLbx:nRowDividerStyle := LINESTYLE_RAISED
oLbx:bClrSelFocus := {|| { CLR_WHITE, RGB(24, 116, 205) } }
oLbx:lColDividerComplete := .t.
oLbx:nHeaderLines := 1
oLbx:lRecordSelector := .t.
oLbx:lAllowRowSizing := .F.
oLbx:l2007 := .T.
oLbx:CreateFromCode()
oLbx:nRowHeight := 19
*/
oVentPrinc:Resize()
oPanel:Resize()
oPanel:Show()
RETURN .t. |
ribbon+oPanel+Xbrowse+TASKPANEL | Tienes un ribbonbar arriba, y abajo un panel y encima del panel un xbrowse.
Es eso todo lo que hay en la pantalla ?
Para que necesitas el panel ahi ? |
ribbon+oPanel+Xbrowse+TASKPANEL | Gracias antonio por responderme, resulta q no puse todo el codigo aca va:
cPersonal:=XServer:Query("SELECT * FROM personal ORDER BY cod_personal")
cPersonal:GoTop()
@ 0, 0 XBROWSE oLbx FIELDS cPersonal:Cod_personal,cPersonal:Nom_Personal,cPersonal:Rut_Personal,cPersonal:Dir_Personal,cPersonal:Ciu_Personal,cPersonal:Car_Personal,cPersonal:Com_Personal;
HEADERS "Codigo","Nombre","R.U.T.","Direccion","Ciudad","Cargo","Comision" ;
FIELDSIZES 80,250,90,200,150,150,50;
OF oPanel //WChld
SetDolphin( oLbx, cPersonal,.f. )
oLbx:bLDblClick := { |nRow,nCol,nKeyFlags|(GetPersonal(.F.,oLbx),oLbx:Refresh())}
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx:nColDividerStyle := LINESTYLE_RAISED
oLbx:nRowDividerStyle := LINESTYLE_RAISED
oLbx:bClrSelFocus := {|| { CLR_WHITE, RGB(24, 116, 205) } }
oLbx:lColDividerComplete := .t.
oLbx:nHeaderLines := 1
oLbx:lRecordSelector := .t.
oLbx:lAllowRowSizing := .F.
oLbx:l2007 := .T.
oLbx:CreateFromCode()
oLbx:nRowHeight := 19
oPanel:oClient := oLbx
if oVentPrinc:oClient <> NIL
oVentPrinc:oClient:Hide()
oVentPrinc:oClient := nil
endif
oVentPrinc:oClient := oPanel
DEFINE TASKPANEL oBar OF oPanel ANCHOR LEFT;
THEME "#CUSTOM";
HEADER "LOGO"
TASKGROUP "Personal" BITMAP "personal" SPECIAL WATERMARK "WATERMARK"
TASKITEM "Nuevo Personal" BITMAP "BAR_NEW" ACTION GetPersonal(.T.,oLbx) TOOLTIP "Insertar Nuevo Personal"
TASKITEM "Modificar Personal" BITMAP "BAR_MOD" ACTION GetPersonal(.f.,oLbx) TOOLTIP "Modificar Personal"
TASKITEM "Eliminar Personal" BITMAP "BAR_DEL" ACTION DelPersonal(oLbx ) TOOLTIP "Eliminar Personal"
TASKITEM "Salir" BITMAP "cancelar" ACTION ( cPersonal:End(),oWChld:End() ) //NIL )
ENDTASKGROUP
TASKGROUP "Detalles" NO COLLAPSABLE
TASKITEM "<b>SOFTCONTROL</b>" + ;
"<p>Software de Control y Gestion</p>"+;
"<p><b>Autor</b></p>" +;
"<p>Jose Briceño Tapia</p>" INFO
ENDTASKGROUP
ENDTASKPANEL
oVentPrinc:Resize()
oPanel:Resize()
oPanel:Show()
RETURN .T.
quiero que la TASKPANEL se vaya a la izquierda y el browse a la derecha, esto me muestra todo bien pero se queda pegado.
saludos |
ribbon+oPanel+Xbrowse+TASKPANEL | Jose,
En FWH\samples\re.prg tienes un ejemplo de cómo hacerlo. Aqui te muestro una imagen:
[img:331w16zp]https://bitbucket.org/fivetech/screenshots/downloads/re.jpg[/img:331w16zp]
la forma de construirlo la encuentras en la función OpenRCFile. Basicamente lo que se hace es usar un splitter, por lo que no tienes que usar un oPanel para nada.
Se crea el control de la izquierda. En re.prg:
oTree = TTreeView():New( 2, 0, oWndRC )
Se crea el control de la derecha:
@ 0, 25.7 GET oMemo VAR cItemText MEMO OF oWndRC SIZE 300, 100
Y finalmente el splitter que controlará a ambos y se le envia el mensaje de ajustar el area de ambos controles:
[code=fw:331w16zp]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">200</span> SPLITTER oSplit ;<br /> <span style="color: #0000ff;">VERTICAL</span> _3DLOOK ;<br /> PREVIOUS CONTROLS oTree ;<br /> HINDS CONTROLS oMemo ; <br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">OF</span> oWndRC<br /> <br /> oSplit:<span style="color: #000000;">AdjClient</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:331w16zp]
Esto es importante:
[code=fw:331w16zp]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndRC ;<br /> <span style="color: #0000ff;">ON</span> RESIZE oSplit:<span style="color: #000000;">AdjClient</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:331w16zp] |
ribbonbar | when I linking my sources where I using Ribbon i get error:
my source
DEFINE RIBBONBAR oRib Window oWnd;
HEIGHT 130;
TOPMARGIN 25 ;
PROMPT "Dokumenty", "Ewidencja", "Kontrahenci","Raporty","Administrator","Koniec"
oRib:nLeftMargin = 85
oRib:CalcPos()
oRib:SetSize( oWnd:nWidth )
ADD GROUP oGr1 RIBBONBAR oRib;
WIDTH 80;
TO OPTION 1;
@ 4, 4 ADD BUTTON GROUP oGr1;
SIZE oGr1:nWidth - 9, oGr1:nHeight - 7;
PROMPT "Dokumenty";
BITMAP "OPEN.BMP";
ACTION MSGINFO( "Test 1" );
POPUP MENU oMenu
Application
===========
Path and name: P:\wSETOW6\wsetow6.exe (32 bits)
Size: 3,356,672 bytes
Compiler version: xHarbour build 1.2.2 Intl. (SimpLex) (Rev. 9719)
FiveWin Version: FWHX 12.06
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 2013.07.03, 19:38:53
Error description: Error BASE/1004 Class: 'NIL' has no exported method: HWND
Args:
[ 1] = U
Stack Calls
===========
Called from: => HWND( 0 )
Called from: source\classes\tribbon.prg => TRIBBONBAR:NEW( 325 )
Called from: wSETOW6.PRG => BUILDMENU( 109 )
Called from: wSETOW6.PRG => MAIN( 41 ) |
ribbonbar | Kajot,
It does not fail with FWH 13.05 (13.06), so surely it has been fixed since the version that you are using.
Could you please run this test and let me know if it also fails there ? thanks
[code=fw:j56h869w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ribbon.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 /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWNd<br /><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRib <span style="color: #0000ff;">Window</span> oWnd;<br /> HEIGHT <span style="color: #000000;">130</span>;<br /> TOPMARGIN <span style="color: #000000;">25</span> ; <br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Dokumenty"</span>, <span style="color: #ff0000;">"Ewidencja"</span>, <span style="color: #ff0000;">"Kontrahenci"</span>,<span style="color: #ff0000;">"Raporty"</span>,<span style="color: #ff0000;">"Administrator"</span>,<span style="color: #ff0000;">"Koniec"</span><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></div>[/code:j56h869w] |
ribbonbar con bmp desde recurso | Hola.
[code=fw:8c3l6wd8]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <span style="color: #000000;">8</span>, <span style="color: #000000;">75</span> ADD <span style="color: #0000ff;">BUTTON</span> ::<span style="color: #000000;">oBtns</span><span style="color: #000000;">[</span> <span style="color: #000000;">02</span> <span style="color: #000000;">]</span> ;<br /> bitmap <span style="color: #ff0000;">"A"</span>;<br /> <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Descendencia"</span> GROUP ::<span style="color: #000000;">oGrp</span><span style="color: #000000;">[</span> <span style="color: #000000;">01</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">action</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">)</span>;</div>[/code:8c3l6wd8]
como hago para que el BITMAP en la definicion tome desde el recurso y no desde el archivo ?
gracias. |
ribbonbar con bmp desde recurso | Hola.
[code=fw:wzrno4b0]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <span style="color: #000000;">8</span>, <span style="color: #000000;">75</span> ADD <span style="color: #0000ff;">BUTTON</span> ::<span style="color: #000000;">oBtns</span><span style="color: #000000;">[</span> <span style="color: #000000;">02</span> <span style="color: #000000;">]</span> ;<br /> bitmap <span style="color: #ff0000;">"A"</span>;<br /> <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Descendencia"</span> GROUP ::<span style="color: #000000;">oGrp</span><span style="color: #000000;">[</span> <span style="color: #000000;">01</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">action</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">)</span>;</div>[/code:wzrno4b0]
como hago para que el BITMAP en la definicion tome desde el recurso y no desde el archivo ?
gracias. |
ribbonbar con bmp desde recurso | Estimado Goosfancito
Quizás éste código le ayude
[code=fw:3vh7a3jb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> HEIGHT <span style="color: #000000;">43</span> TOPMARGIN <span style="color: #000000;">0</span> <br /> ADD GROUP oGr1 RIBBON oRBar <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #00C800;">Nil</span> WIDTH <span style="color: #000000;">70</span> <br /> @<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> RBBTN oBtn1 GROUP oGr1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> BITMAP <span style="color: #ff0000;">"B-Salir1"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">69</span>,<span style="color: #000000;">34</span> <span style="color: #0000ff;">OF</span> oGr1 MOSTLEFT <span style="color: #0000ff;">ROUND</span> <span style="color: #0000ff;">Action</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> </div>[/code:3vh7a3jb] |
ribbonbar con bmp desde recurso | jajja
espectacular! gracias gracias! |
ribbonbar con bmp desde recurso | BITMAP "RBTOOLS" <<<-----assim mesmo |
ribbonbar high | Hello,
I am still working on the “Metro like” release.
Although I made some changes in usability. I do not use full screen obligatory as I planed when I started.
It seems to me that the ribbonbar consumes to much space. How can I reduce high.
Best regard,
Otto
[img:10hi3usr]http://www.bergland.info/fivewin/Clip10.jpg[/img:10hi3usr]
[img:10hi3usr]http://www.bergland.info/fivewin/Clip11.jpg[/img:10hi3usr]
[img:10hi3usr]http://www.bergland.info/fivewin/Clip12.jpg[/img:10hi3usr] |
ribbonbar high | Otto, try with clausule nHeight ?
As always, his designs are great
[code=fw:2n3p6ii0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />#xcommand <span style="color: #0000ff;">DEFINE</span> RIBBONBAR <span style="color: #000000;">[</span> <oRBar> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <of:<span style="color: #0000ff;">OF</span>, WINDOW> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <prm: <span style="color: #0000ff;">PROMPT</span>, <span style="color: #0000ff;">PROMPTS</span>, ITEMS> <cPrompt,...> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <act: <span style="color: #0000ff;">ACTION</span>, EXECUTE, <span style="color: #0000ff;">ON</span> CHANGE> <uAction> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> OPTION <nOption> <span style="color: #000000;">]</span> ;<br /><br /> <span style="color: #000000;">[</span> HEIGHT <nHeight> <span style="color: #000000;">]</span> ;<br /><br /> <span style="color: #000000;">[</span> TOPMARGIN <nTopMargin> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">COLOR</span> <nClrPane> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <ColorBox: <span style="color: #000000;">COLORBOX</span>> <nClrBoxOut>,<nClrBoxIn> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <ColorSel: <span style="color: #000000;">COLORSEL</span>> <nClrBoxSelOut>,<nClrBoxSelIn> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <l2010: <span style="color: #000000;">2010</span>, _2010> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> <l2013: <span style="color: #000000;">2013</span>, _2013> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> STARTBTN <nStart> <span style="color: #000000;">]</span>;<br /> => ;<br /> <span style="color: #000000;">[</span><oRBar> := <span style="color: #000000;">]</span> TRibbonBar<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <oWnd>, <span style="color: #000000;">[</span>\<span style="color: #000000;">{</span><cPrompt>\<span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|nOption,nOldOption|<uAction><span style="color: #000000;">}</span><span style="color: #000000;">]</span>, ;<br /> <nOption>, , <nHeight>, <nTopMargin>, <nClrPane>, <nClrBoxOut>, <nClrBoxIn>, <nClrBoxSelOut>, ;<br /> <nClrBoxSelIn>, , , , , <.l2010.>, <nStart>, <.l2013.> <span style="color: #000000;">)</span><br /><br /> </div>[/code:2n3p6ii0] |
ribbonbar high | Hello Cristobal,
Thank you and thank you for your kind words.
Now it is working. I have to set HEIGHT and TOPMARGIN.
Best regards,
Otto |
ribbonbar windows 10 | Hola
Como puedo poner en una ribbonbar el estilo windows 10 ?
Saludos,
Gabriel |
ribbonbar windows 10 | Puedes poner una imagen?
Gracias |
ribbonbar windows 10 | DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Tab 01", "Tab 02", "Tab 03" 2010 |
ribbonbar windows 10 | Prueba también:
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Tab 01", "Tab 02", "Tab 03" 2015 |
ribbonbar windows 10 | Hola
Adjunto pantallazo del paint, esta sería la idea.
Saludos,
[url=http://es.zimagez.com/zimage/windows20.php:2jfoaqkp][img:2jfoaqkp]http://es.zimagez.com/miniature/windows20.jpg[/img:2jfoaqkp][/url:2jfoaqkp] |
ribbonbar windows 10 | Prueba con la cláusula 2015
No es exactamente el mismo, pero se asemeja bastante |
ribbonbar windows 10 | Antonio, se ve regular, en el degradado al pasar por lo botones no es el mismo, adjunto una pantallazo.
Saludos y Mil gracias
[url=https://imgbb.com/:rw8fi64d][img:rw8fi64d]https://image.ibb.co/dR6b5k/Dibujo.jpg[/img:rw8fi64d][/url:rw8fi64d] |
ribbonbar windows 10 | Utiliza el estilo 2013 y configura los colores que no te gusten como necesites |
ribbonbar windows 10 | Una funcionalidad interesante de las Ribbonbar de office es que haciendo doble click en la pestaña la ribbon se contrae, y unicamente se muestran los títulos de las pestañas asemejando a un menú. ¿ Esto se puede hacer con la RB de FWH ?
Saludos, |
ribbonbar windows 10 | José Luis,
De momento no |
ribbonbar windows 10 | José Luis,
Modificando asi el Método LDblClick() en la Clase TRibbonBar y con el ejemplo que te pongo a continuación se consigue el efecto que comentas:
[code=fw:38q4rmxk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> LDblClick<span style="color: #000000;">(</span> nRow, nCol, nFlags <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TRibbonBar<br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClickQ</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"B"</span> .and. ::<span style="color: #000000;">lOverQ</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClickQ</span>, nRow, nCol, nFlags <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClick</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"B"</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClick</span>, nRow, nCol, nFlags <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:38q4rmxk]
Aqui tienes un ejemplo que se comporta como indicas:
[code=fw:38q4rmxk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ribbon.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 /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> BuildRibbonBar<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildRibbonBar<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oRBar, oGr1_1, oGr2_1, oBtn1_1_1, oBtn2_1_1<br /><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> HEIGHT <span style="color: #000000;">134</span> TOPMARGIN <span style="color: #000000;">25</span><br /><br /> oRBar:<span style="color: #000000;">bLDblClick</span> = <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">nHeight</span> > <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">129</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> ADD GROUP oGr1_1 RIBBON oRBar <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> WIDTH <span style="color: #000000;">201</span> GRADIANT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.9</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;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn1_1_1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> GROUP oGr1_1 <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">83</span> TOP<br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">83</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn2_1_1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> GROUP oGr1_1 <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">83</span> TOP<br /><br /> ADD GROUP oGr2_1 RIBBON oRBar <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> WIDTH <span style="color: #000000;">201</span> GRADIANT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.9</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;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:38q4rmxk]
Este es el código en concreto que hace lo que has comentado:
[code=fw:38q4rmxk]<div class="fw" id="{CB}" style="font-family: monospace;">oRBar:<span style="color: #000000;">bLDblClick</span> = <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">nHeight</span> > <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">129</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:38q4rmxk] |
ribbonbar windows 10 | nice |
ribbonbar windows 10 | Hola
Como puedo cambiar el color de selección de un botón ?
Saludos,
Gracias
[img:2pt6j64o]http://img.fenixzone.net/i/b0XNSvl.jpeg[/img:2pt6j64o] |
ribbonbar windows 10 | [quote="Antonio Linares":3dfat4b7]José Luis,
Modificando asi el Método LDblClick() en la Clase TRibbonBar y con el ejemplo que te pongo a continuación se consigue el efecto que comentas:
[code=fw:3dfat4b7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> LDblClick<span style="color: #000000;">(</span> nRow, nCol, nFlags <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TRibbonBar<br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClickQ</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"B"</span> .and. ::<span style="color: #000000;">lOverQ</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClickQ</span>, nRow, nCol, nFlags <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClick</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"B"</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bLDblClick</span>, nRow, nCol, nFlags <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:3dfat4b7]
Aqui tienes un ejemplo que se comporta como indicas:
[code=fw:3dfat4b7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ribbon.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 /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /> BuildRibbonBar<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildRibbonBar<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oRBar, oGr1_1, oGr2_1, oBtn1_1_1, oBtn2_1_1<br /><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> HEIGHT <span style="color: #000000;">134</span> TOPMARGIN <span style="color: #000000;">25</span><br /><br /> oRBar:<span style="color: #000000;">bLDblClick</span> = <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">nHeight</span> > <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">129</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> ADD GROUP oGr1_1 RIBBON oRBar <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> WIDTH <span style="color: #000000;">201</span> GRADIANT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.9</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;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn1_1_1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> GROUP oGr1_1 <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">83</span> TOP<br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">83</span> ADD <span style="color: #0000ff;">BUTTON</span> oBtn2_1_1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> GROUP oGr1_1 <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">83</span> TOP<br /><br /> ADD GROUP oGr2_1 RIBBON oRBar <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"new"</span> WIDTH <span style="color: #000000;">201</span> GRADIANT <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.9</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;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3dfat4b7]
Este es el código en concreto que hace lo que has comentado:
[code=fw:3dfat4b7]<div class="fw" id="{CB}" style="font-family: monospace;">oRBar:<span style="color: #000000;">bLDblClick</span> = <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">nHeight</span> > <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">27</span>, oRBar:<span style="color: #000000;">nHeight</span> := <span style="color: #000000;">129</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:3dfat4b7][/quote:3dfat4b7]
Included in FWH 17.04 |
ribbonbar windows 10 | Ejemplo
[code=fw:19qy74dj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #00C800;">local</span> aClrMenu1 := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">69</span>, <span style="color: #000000;">124</span>, <span style="color: #000000;">188</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">93</span>, <span style="color: #000000;">171</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">136</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">56</span>, <span style="color: #000000;">135</span>, <span style="color: #000000;">191</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aClrMenu2 := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">123</span>, <span style="color: #000000;">178</span>, <span style="color: #000000;">236</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">71</span>, <span style="color: #000000;">126</span>, <span style="color: #000000;">205</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">17</span>, <span style="color: #000000;">78</span>, <span style="color: #000000;">175</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">225</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><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;">"RibbonBar Test "</span> + FWVERSION <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">600</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Configuración"</span>, <span style="color: #ff0000;">"Ficheros"</span>, <span style="color: #ff0000;">"Informes"</span>, <span style="color: #ff0000;">"Ayudas"</span> ;<br /> HEIGHT <span style="color: #000000;">133</span> TOPMARGIN <span style="color: #000000;">25</span> <span style="color: #000000;">2013</span><br /><br /> oRBar:<span style="color: #000000;">nRoundBox</span> := <span style="color: #000000;">0</span><br /> oRBar:<span style="color: #000000;">nSeparation</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// BackStage( oRBar )</span><br /> <br /> oRBar:<span style="color: #000000;">nLeftMargin</span> = <span style="color: #000000;">75</span><br /> oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oTBtn0 = TRBtn<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">75</span>, <span style="color: #000000;">20</span>, <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\r</span>bnmenu.bmp"</span>, <span style="color: #000000;">{</span> || oRBar:<span style="color: #000000;">BackStage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">/* oRBar:KeybMode() */</span> <span style="color: #000000;">}</span>, oRBar,;<br /> ,,,,,, .F., .T.,,,,,, <span style="color: #ff0000;">"POPUP"</span>, oMenu,,,,,,,,,,,,, aClrMenu1, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">125</span>, <span style="color: #000000;">172</span>, <span style="color: #000000;">215</span> <span style="color: #000000;">)</span>,;<br /> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">65</span>, <span style="color: #000000;">106</span>, <span style="color: #000000;">189</span> <span style="color: #000000;">)</span>, oRBar:<span style="color: #000000;">nRoundBox</span>, <span style="color: #000000;">)</span> <br /> oTBtn0:<span style="color: #000000;">aClrGradOver</span> = <span style="color: #000000;">{</span> || aClrMenu2 <span style="color: #000000;">}</span><br /> oTBtn0:<span style="color: #000000;">aClrGradBack</span> = aClrMenu2<br /> oTBtn0:<span style="color: #000000;">bClrGradSubOver</span> = <span style="color: #000000;">{</span> || aClrMenu2 <span style="color: #000000;">}</span><br /><br /> </div>[/code:19qy74dj] |
ribbonbar windows 10 | Antonio,
I tried to insert this features on my app
on a Window I open a dialog with nStyle := nOR( WS_CHILD, 4 )
if this dialog is actived and I click then it insert a space from tab and the dialog activated and I not Know How refresh the dialog to change the size
I tried with aClient := GetClientRect (oWnd:hWnd ) and the setsize but it not refresh
[img:r8c08jk1]http://www.iispascalcomiforti.it/wp-content/uploads/2017/04/nnnn.jpg[/img:r8c08jk1] |
ribbonbar windows 10 | Try with oWnd:Resize() |
ribbonbar windows 10 | ::oBar:bLDblClick = { || (If( ::oBar:nHeight > 27, ::oBar:nHeight := 27, ::oBar:nHeight := nHeightRib),;
ResizeWndMain())}
my resize function
oApp():oBar is a ribbonbar
Function ResizeWndMain()
local aClient
if oApp():oDlg != NIL
aClient := GetClientRect (oApp():oWndMain:hWnd )
oApp():oDlg:SetSize( aClient[4], aClient[3] - oApp():oBar:nHeight - oApp():oWndMain:oMsgBar:nHeight )
oApp():oDlg:Refresh()
endif
return NIL |
ribbonbar windows 10 | Gracias Antonio, el hack funciona perfectamente.
Saludos, |
ribbonbar windows 10 | Hola
Perdonen por tanta molestia, pero no hay manera de cambiar el color, al pasar el ratón por encima del boton de la ribbonbar, como se puede hacer ?
[img:24kf5lb2]http://img.fenixzone.net/i/a2cDWXd.jpeg[/img:24kf5lb2]
Saludos |
ribbonbar windows 10 | Aqui tienes un ejemplo:
[code=fw:7ayv02yb]<div class="fw" id="{CB}" style="font-family: monospace;">oButton:<span style="color: #000000;">bClrGradNormal</span> := <span style="color: #000000;">{</span> | lPressed | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lPressed,;<br /> <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;">214</span>, <span style="color: #000000;">172</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>,;<br /> <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;">230</span>, <span style="color: #000000;">220</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:7ayv02yb] |
ribbonbar windows 10 | Gracias Antonio, ahora si me funciona perfectamente.
Saludos, |
ribonbar ocultar pestaña ( SOLUCIONADO ) | Estimados
se puede ocultar del ribonbar una pestaña
desde ya gracias |
ribonbar ocultar pestaña ( SOLUCIONADO ) | DEFINE RIBBONBAR oRibbon OF oWnd Prompt "" HEIGHT 45 TOPMARGIN 3 2010
oRibbon:aVisible[1] := .F. // Para que NO se Pinten los Tabs |
ribonbar ocultar pestaña ( SOLUCIONADO ) | Hola SantaCroya
Muchas gracias, funciono perfecto, solo que si es un pestaña posterior queda en blanco
lo solucione asi
oRBar:hide(5)
oRBar:Hide(6) |
ribonbar tolltip not showing | Good morning
Tooltips donot show on buttons inside ribbonbar , any idea ?
I am using fwh 11.04
Thanks for help
small sample of code
[code=fw:16kyxsee]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> OBRUSH1 FILE DIRAPPLI<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"BMP<span style="color: #000000;">\F</span>OND.JPG"</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> wndrib <span style="color: #0000ff;">TITLE</span> DLIBDF <span style="color: #0000ff;">from</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">600</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">brush</span> oBrush1<br /><br /><span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> wndrib <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Edition"</span>, <span style="color: #ff0000;">"Références"</span>, <span style="color: #ff0000;">"Global"</span> HEIGHT <span style="color: #000000;">160</span> TOPMARGIN <span style="color: #000000;">25</span><br /><br />ADD GROUP TGR<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> RIBBON oRBar <span style="color: #0000ff;">TO</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Edition"</span> WIDTH <span style="color: #000000;">150</span><br /><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> wndrib <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"C.BATI Technique"</span> <span style="color: #0000ff;">CENTERED</span> DATE CLOCK KEYBOARD <span style="color: #000000;">2007</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> wndrib <span style="color: #0000ff;">MAXIMIZED</span><br /><br />StopUntil<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || LFIN <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">IF</span> WNDRIB # <span style="color: #00C800;">NIL</span><br /> WNDRIB:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />@ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> ADD <span style="color: #0000ff;">BUTTON</span> TBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> GROUP TGR<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> BITMAP DIRAPPLI<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"BMP<span style="color: #000000;">\T</span>EXTE.BMP"</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"F2 &Texte"</span> first <span style="color: #0000ff;">round</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ACTION</span> xxxx<br />TBTN<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">CTOOLTIP</span> := <span style="color: #ff0000;">"Ajouter texte libre"</span> <span style="color: #B900B9;">// this is not showing</span><br /><br /> </div>[/code:16kyxsee] |
ribonbar tolltip not showing | Richard,
Here tooltips are working fine on ribbonbar buttons, in fact we have modified FWH\samples\rbdesign.prg to allow buttons tooltips editing, and its working.
Please notice that in your example you are setting the tooltip after the ACTIVATE WINDOW ... so the program execution does not reach there until the window is closed.
Here you have the modified rbdesign.prg so you can set tooltips and check them working:
rbdesign.prg
[code=fw:1dah32lj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// RibbonBar designer (c) FiveTech Software 2011</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ribbon.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"slider.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> TYPE_NORMAL <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> TYPE_POPUP <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> TYPE_SPLITPOPUP <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> TYPE_SAYBUTTON <span style="color: #000000;">3</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd, oRBar<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;">"RibbonBar designer (c) FiveTech Software 2011"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> HEIGHT <span style="color: #000000;">133</span> TOPMARGIN <span style="color: #000000;">25</span> <span style="color: #B900B9;">// 2010</span><br /><br /> SetRibbonEditable<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> MSGBAR <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Right click on the RibbonBar top area or on each RibbonBar item"</span> <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> SetRibbonEditable<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> n, m, p, oGroup, oButton<br /><br /> oRBar:<span style="color: #000000;">bRClicked</span> = <span style="color: #000000;">{</span> | nRow, nCol | RibbonBarOptions<span style="color: #000000;">(</span> nRow, nCol, oRBar, oRBar:<span style="color: #000000;">oWnd</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">)</span><br /> oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span>:<span style="color: #000000;">bRClicked</span> = <span style="color: #000000;">{</span> | nRow, nCol | RibbonDialogOptions<span style="color: #000000;">(</span> nRow, nCol, oRBar, oRBar:<span style="color: #000000;">oWnd</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #00C800;">if</span> oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span>:<span style="color: #000000;">aControls</span> != <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">for</span> m = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span>:<span style="color: #000000;">aControls</span> <span style="color: #000000;">)</span><br /> oGroup = oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span>:<span style="color: #000000;">aControls</span><span style="color: #000000;">[</span> m <span style="color: #000000;">]</span><br /> oGroup:<span style="color: #000000;">bRClicked</span> = GenGroupBlock<span style="color: #000000;">(</span> oGroup <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">if</span> oGroup:<span style="color: #000000;">aControls</span> != <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">for</span> p = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">)</span><br /> oButton = oGroup:<span style="color: #000000;">aControls</span><span style="color: #000000;">[</span> p <span style="color: #000000;">]</span><br /> oButton:<span style="color: #000000;">bRClicked</span> = GenButtonBlock<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /> <span style="color: #00C800;">next</span><br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">next</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> GenGroupBlock<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">{</span> | nRow, nCol | RibbonGroupOptions<span style="color: #000000;">(</span> nRow, nCol, oRBGroup <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> GenButtonBlock<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">{</span> | nRow, nCol | RibbonButtonOptions<span style="color: #000000;">(</span> nRow, nCol, oButton <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonBarOptions<span style="color: #000000;">(</span> nRow, nCol, oRBar, oWnd <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oMenu<br /> <br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Add a tab..."</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">AddTab</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"new"</span> <span style="color: #000000;">)</span>, ATail<span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">{</span> | nRow, nCol | RibbonDialogOptions<span style="color: #000000;">(</span> nRow, nCol, oRBar <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit tab label..."</span> <span style="color: #0000ff;">ACTION</span> EditTabLabel<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Delete tab..."</span> <span style="color: #0000ff;">ACTION</span> DeleteTab<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <br /> <span style="color: #00C800;">if</span> oRBar:<span style="color: #000000;">lQuickRound</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"QuickButton"</span> <span style="color: #0000ff;">ACTION</span> BuildNewRibbon<span style="color: #000000;">(</span> oRBar, <span style="color: #000000;">60</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"QuickButton"</span> <span style="color: #0000ff;">ACTION</span> oRBar := BuildNewRibbon<span style="color: #000000;">(</span> oRBar, <span style="color: #000000;">60</span> <span style="color: #000000;">)</span>, oRBar:<span style="color: #000000;">QuickRoundBtn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #00C800;">if</span> oRBar:<span style="color: #000000;">oQuickAcc</span> == <span style="color: #00C800;">nil</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"QuickAccess"</span> <span style="color: #0000ff;">ACTION</span> oRBar:<span style="color: #000000;">QuickAccess</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"QuickAccess"</span> <span style="color: #0000ff;">ACTION</span> oRBar:<span style="color: #000000;">oQuickAcc</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oRBar:<span style="color: #000000;">oQuickAcc</span> := <span style="color: #00C800;">nil</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Source code..."</span> <span style="color: #0000ff;">ACTION</span> MemoEdit<span style="color: #000000;">(</span> <span style="color: #ff0000;">"function BuildRibbonBar()"</span> + CRLF + CRLF + ;<br /> oRBar:<span style="color: #000000;">cGenPrg</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"return nil"</span> + CRLF + CRLF + ;<br /> oRBar:<span style="color: #000000;">cGenButtonMenus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"source code"</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Save as..."</span> <span style="color: #0000ff;">ACTION</span> MemoWrit<span style="color: #000000;">(</span> cGetFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"myribbon.prg"</span>, <span style="color: #ff0000;">"Please select a PRG filename to save the RibbonBar in"</span> <span style="color: #000000;">)</span>,;<br /> BuildRibbonCode<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Load from..."</span> <span style="color: #0000ff;">ACTION</span> CompileRibbon<span style="color: #000000;">(</span> oWnd, oRBar <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"New design..."</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Do you want to start a new design ?"</span> <span style="color: #000000;">)</span>, BuildNewRibbon<span style="color: #000000;">(</span> oRBar, <span style="color: #000000;">25</span> <span style="color: #000000;">)</span>,<span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #0000ff;">WINDOW</span> oRBar <span style="color: #00C800;">AT</span> nRow, nCol<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BuildRibbonCode<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cCode := <span style="color: #ff0000;">'#include "FiveWin.ch"'</span> + CRLF + <span style="color: #ff0000;">'#include "ribbon.ch"'</span> + CRLF + CRLF<br /> <br /> cCode += <span style="color: #ff0000;">"function BuildRibbonBar( oWnd, _oRBar )"</span> + CRLF + CRLF<br /> cCode += oRBar:<span style="color: #000000;">cGenPrg</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cCode += <span style="color: #ff0000;">"return _oRBar := oRBar"</span> + CRLF + CRLF<br /> cCode += oRBar:<span style="color: #000000;">cGenButtonMenus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> cCode <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> ButtonPosDim<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Button position and dimensions"</span><br /> <br /> @ <span style="color: #000000;">0.2</span>, <span style="color: #000000;">1.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Top:"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oButton:<span style="color: #000000;">nTop</span> SPINNER <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">15</span><br /><br /> @ <span style="color: #000000;">0.2</span>, <span style="color: #000000;">13.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Left:"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oButton:<span style="color: #000000;">nLeft</span> SPINNER <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">15</span><br /> <br /> @ <span style="color: #000000;">2.1</span>, <span style="color: #000000;">1.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Width:"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> <br /> @ <span style="color: #000000;">3.2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oButton:<span style="color: #000000;">nWidth</span> SPINNER <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">15</span><br /><br /> @ <span style="color: #000000;">2.1</span>, <span style="color: #000000;">13.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Height:"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> <br /> @ <span style="color: #000000;">3.2</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oButton:<span style="color: #000000;">nHeight</span> SPINNER <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">15</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BuildNewRibbon<span style="color: #000000;">(</span> oRBar, nHeight <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := oRBar:<span style="color: #000000;">oWnd</span><br /><br /> oRBar:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> HEIGHT <span style="color: #000000;">133</span> TOPMARGIN nHeight <span style="color: #B900B9;">// 2010</span><br /> <br /> oRBar:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">nWidth</span>, oRBar:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> SetRibbonEditable<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> oRBar<br /> <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonDialogOptions<span style="color: #000000;">(</span> nRow, nCol, oRBar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oMenu, oRBGroup<br /> <br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Add a group..."</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBGroup := oRBar:<span style="color: #000000;">AddGroup</span><span style="color: #000000;">(</span> <span style="color: #000000;">200</span>, <span style="color: #ff0000;">"new"</span>, oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">)</span>,;<br /> oRBGroup:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">{</span> | nRow, nCol | RibbonGroupOptions<span style="color: #000000;">(</span> nRow, nCol, oRBGroup <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #0000ff;">WINDOW</span> oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">]</span> <span style="color: #00C800;">AT</span> nRow, nCol<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonGroupOptions<span style="color: #000000;">(</span> nRow, nCol, oRBGroup <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">local</span> oMenu, oButton, bClick := <span style="color: #000000;">{</span> | o | <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Add a button"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton := oRBGroup:<span style="color: #000000;">AddButton</span><span style="color: #000000;">(</span> <span style="color: #000000;">3</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ! Empty<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">)</span> .and. Len<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span>, ATail<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">nRight</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>, oRBGroup:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">19</span>, <span style="color: #000000;">80</span>, <span style="color: #ff0000;">"new"</span>, bClick <span style="color: #000000;">)</span>,;<br /> oButton:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">{</span> | nRow, nCol | RibbonButtonOptions<span style="color: #000000;">(</span> nRow, nCol, oButton <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit width..."</span> <span style="color: #0000ff;">ACTION</span> EditGroupWidth<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit label..."</span> <span style="color: #0000ff;">ACTION</span> EditGroupLabel<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Select colors..."</span> <span style="color: #0000ff;">ACTION</span> SelGroupColors<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">SEPARATOR</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Delete group..."</span> <span style="color: #0000ff;">ACTION</span> ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Are you sure ?"</span>, <span style="color: #ff0000;">"Delete this group"</span> <span style="color: #000000;">)</span>, oRBGroup:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ENDMENU</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #0000ff;">WINDOW</span> oRBGroup <span style="color: #00C800;">AT</span> nRow, nCol<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonButtonOptions<span style="color: #000000;">(</span> nRow, nCol, oButton <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">local</span> oMenu, oPopup := oButton:<span style="color: #000000;">oPopup</span><br /> <br /> <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit prompt..."</span> <span style="color: #0000ff;">ACTION</span> EditButtonLabel<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit tooltip..."</span> <span style="color: #0000ff;">ACTION</span> EditButtonToolTip<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Select bitmap..."</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">(</span> cGetFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"*.bmp"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Popup menu..."</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oPopup := EditButtonMenu<span style="color: #000000;">(</span> oButton, oPopup <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Set style"</span> <br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_NORMAL<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NORMAL"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_NORMAL, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED <br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NORMAL"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_NORMAL, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_POPUP<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"POPUP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_POPUP, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"POPUP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_POPUP, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_SPLITPOPUP<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SPLITPOPUP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SPLITPOPUP, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SPLITPOPUP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SPLITPOPUP, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_SAYBUTTON<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SAYBUTTON"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SAYBUTTON, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SAYBUTTON"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SAYBUTTON, oButton:<span style="color: #0000ff;">Refresh</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: #0000ff;">ENDMENU</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Set layout"</span> <br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">3</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"TOP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">3</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED <br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"TOP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">3</span>, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">4</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"LEFT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">4</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"LEFT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">4</span>, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">1</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"BOTTOM"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">1</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"BOTTOM"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">1</span>, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">2</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"RIGHT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">2</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"RIGHT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">2</span>, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">5</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTLEFT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">5</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTLEFT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">5</span>, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">6</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTRIGHT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">6</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTRIGHT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">6</span>, oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">7</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"CENTER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">7</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"CENTER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">nLayout</span> := <span style="color: #000000;">7</span>, oButton:<span style="color: #0000ff;">Refresh</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: #0000ff;">ENDMENU</span> <br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Set border"</span> <br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #00C800;">if</span> ! oButton:<span style="color: #000000;">lBorder</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NOBORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">lBorder</span> := .F., oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED <br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NOBORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">lBorder</span> := .F., oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">lBorder</span> .and. ! oButton:<span style="color: #000000;">lRound</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SQUARE BORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">lBorder</span> := .T., oButton:<span style="color: #000000;">lRound</span> := .F., oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SQUARE BORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">lBorder</span> := .T., oButton:<span style="color: #000000;">lRound</span> := .F., oButton:<span style="color: #0000ff;">Refresh</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;">if</span> oButton:<span style="color: #000000;">lBorder</span> .and. oButton:<span style="color: #000000;">lRound</span> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"ROUNDED BORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">lBorder</span> := .T., oButton:<span style="color: #000000;">lRound</span> := .T., oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CHECKED<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"ROUNDED BORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">lBorder</span> := .T., oButton:<span style="color: #000000;">lRound</span> := .T., oButton:<span style="color: #0000ff;">Refresh</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: #0000ff;">ENDMENU</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Position and dimensions..."</span> <span style="color: #0000ff;">ACTION</span> ButtonPosDim<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Delete button..."</span> <span style="color: #0000ff;">ACTION</span> ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Are you sure ?"</span>, <span style="color: #ff0000;">"Delete this button"</span> <span style="color: #000000;">)</span>, oButton:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">)</span> <br /> <span style="color: #0000ff;">ENDMENU</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #0000ff;">WINDOW</span> oButton <span style="color: #00C800;">AT</span> nRow, nCol SAVE <span style="color: #B900B9;">// SAVE it so it will not be destroyed later on</span><br /><br /> <span style="color: #00C800;">if</span> oPopup != <span style="color: #00C800;">nil</span> .and. oPopup:<span style="color: #000000;">hMenu</span> != oMenu:<span style="color: #000000;">hMenu</span><br /> oButton:<span style="color: #000000;">oPopup</span> = oPopup<br /> <span style="color: #00C800;">endif</span> <br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> CompileRibbon<span style="color: #000000;">(</span> oWnd, oRBar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oHrb, cResult, bOldError, lError := .T. <br /> <span style="color: #00C800;">local</span> cCode := MemoRead<span style="color: #000000;">(</span> cGetFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"*.prg"</span>, <span style="color: #ff0000;">"Please select the PRG to build the RibbonBar from"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cCode <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /> oRBar:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> FReOpen_Stderr<span style="color: #000000;">(</span> <span style="color: #ff0000;">"comp.log"</span>, <span style="color: #ff0000;">"w"</span> <span style="color: #000000;">)</span><br /> oHrb = HB_CompileFromBuf<span style="color: #000000;">(</span> cCode, <span style="color: #ff0000;">"-n"</span>, <span style="color: #ff0000;">"-Ic:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\i</span>nclude"</span>, <span style="color: #ff0000;">"-Ic:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\i</span>nclude"</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">(</span> cResult := MemoRead<span style="color: #000000;">(</span> <span style="color: #ff0000;">"comp.log"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> cResult <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> oHrb <span style="color: #000000;">)</span><br /> BEGIN SEQUENCE<br /> bOldError = ErrorBlock<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | o | DoBreak<span style="color: #000000;">(</span> o <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oRBar = hb_HrbRun<span style="color: #000000;">(</span> oHrb, oWnd, oRBar <span style="color: #000000;">)</span><br /> lError = .F.<br /> END SEQUENCE <br /> ErrorBlock<span style="color: #000000;">(</span> bOldError <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">if</span> lError<br /> <span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span> HEIGHT <span style="color: #000000;">133</span> TOPMARGIN <span style="color: #000000;">25</span> <span style="color: #B900B9;">// 2010</span><br /> <span style="color: #00C800;">endif</span><br /> oRBar:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">nWidth</span>, oRBar:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> SetRibbonEditable<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> DoBreak<span style="color: #000000;">(</span> oError <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cInfo := oError:<span style="color: #000000;">operation</span>, n<br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"A"</span><br /> cInfo += <span style="color: #ff0000;">" Args:"</span> + CRLF<br /> <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> oError:<span style="color: #000000;">Args</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> cInfo += <span style="color: #ff0000;">"["</span> + Str<span style="color: #000000;">(</span> n, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"] = "</span> + ValType<span style="color: #000000;">(</span> oError:<span style="color: #000000;">Args</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> + ;<br /> <span style="color: #ff0000;">" "</span> + cValToChar<span style="color: #000000;">(</span> oError:<span style="color: #000000;">Args</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> + CRLF<br /> <span style="color: #00C800;">next</span><br /> <span style="color: #00C800;">endif</span><br /><br /> MsgStop<span style="color: #000000;">(</span> oError:<span style="color: #000000;">Description</span> + CRLF + cInfo,;<br /> <span style="color: #ff0000;">"Script error at line: "</span> + Str<span style="color: #000000;">(</span> ProcLine<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">BREAK</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditGroupWidth<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, nWidth := oRBGroup:<span style="color: #000000;">nWidth</span>, nOldWidth := nWidth<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;">"Edit Group width"</span><br /> <br /> @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> nWidth <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">8</span> SPINNER ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oRBGroup:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> nWidth, oRBGroup:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">6</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> nWidth, oRBGroup:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">SetSize</span><span style="color: #000000;">(</span> nOldWidth, oRBGroup:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditTabLabel<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">[</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">]</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, cOldLabel := oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">[</span> oRBar:<span style="color: #000000;">nOption</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;">TITLE</span> <span style="color: #ff0000;">"Edit tab label"</span><br /> <br /> @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cLabel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">[</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">]</span> := AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">6</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">[</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">]</span> := AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">[</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">]</span> := cOldLabel, oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> DeleteTab<span style="color: #000000;">(</span> oRBar <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Are you sure ?"</span> <span style="color: #000000;">)</span><br /> oRBar:<span style="color: #000000;">DeleteTab</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditGroupLabel<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">cCaption</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, cOldLabel := oRBGroup:<span style="color: #000000;">cCaption</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;">"Edit Group label"</span><br /> <br /> @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cLabel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">6</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> cOldLabel <span style="color: #000000;">)</span>, oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditButtonLabel<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">(</span> oButton:<span style="color: #000000;">cCaption</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, cOldLabel := oButton:<span style="color: #000000;">cCaption</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;">"Edit Button label"</span><br /> <br /> @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cLabel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">6</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> cOldLabel <span style="color: #000000;">)</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditButtonToolTip<span style="color: #000000;">(</span> oButton <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">(</span> oButton:<span style="color: #000000;">cToolTip</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, cOldToolTip := oButton:<span style="color: #000000;">cToolTip</span><br /> <br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cLabel <span style="color: #000000;">)</span><br /> cLabel = PadR<span style="color: #000000;">(</span> <span style="color: #ff0000;">"tooltip"</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</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;">"Edit Button ToolTip"</span><br /> <br /> @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cLabel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oButton:<span style="color: #000000;">cTooltip</span> := AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">6</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">cToolTip</span> := AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oButton:<span style="color: #000000;">cToolTip</span> := cOldToolTip, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditButtonMenu<span style="color: #000000;">(</span> oButton, oPopup <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oTv, oGet, cLabel := Space<span style="color: #000000;">(</span> <span style="color: #000000;">30</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;">TITLE</span> <span style="color: #ff0000;">"Button menu editor"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">329</span>, <span style="color: #000000;">300</span><br /> <br /> @ <span style="color: #000000;">0.2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Items"</span><br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> TREEVIEW oTv <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">GetText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">0.8</span>, <span style="color: #000000;">18.5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Add item"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> oTv:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"New"</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">18.5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Add subitem"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> oTv:<span style="color: #0000ff;">Select</span><span style="color: #000000;">(</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"New"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">2.8</span>, <span style="color: #000000;">18.5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Del item"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">6.2</span>, <span style="color: #000000;">18.5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oPopup := oTv:<span style="color: #000000;">GenMenu</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">7.2</span>, <span style="color: #000000;">18.5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">46</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">8</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Label"</span> <span style="color: #0000ff;">OF</span> oDlg<br /> <br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">0.8</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cLabel <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">13</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> AllTrim<span style="color: #000000;">(</span> oGet:<span style="color: #000000;">GetText</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;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oPopup != <span style="color: #00C800;">nil</span>, oTv:<span style="color: #000000;">LoadFromMenu</span><span style="color: #000000;">(</span> oPopup <span style="color: #000000;">)</span>, oTv:<span style="color: #000000;">SetItems</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"one"</span>, <span style="color: #ff0000;">"two"</span>, <span style="color: #ff0000;">"three"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">if</span> oPopup != <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_NORMAL .or. oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_SAYBUTTON<br /> oButton:<span style="color: #000000;">nTypeButton</span> = TYPE_POPUP<br /> oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /><span style="color: #00C800;">return</span> oPopup <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> SelGroupColors<span style="color: #000000;">(</span> oRBGroup <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> bChoose := <span style="color: #000000;">{</span> | oG | ChangeGrad1<span style="color: #000000;">(</span> oG, oRBGroup <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> ChooseGradient<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">aGradSel</span>, bChoose, , <span style="color: #000000;">{</span> | oChoose | CancelGroupGrad<span style="color: #000000;">(</span> oChoose, oRBGroup <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CancelGroupGrad<span style="color: #000000;">(</span> oChoose, oRBGroup <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">local</span> aGrad1<br /> <span style="color: #00C800;">local</span> hBmp, hBright<br /> <br /> aGrad1 = oChoose:<span style="color: #000000;">aInit</span><br /> <br /> oRBGroup:<span style="color: #000000;">aGradSel</span> = aGrad1<br /> DeleteObject<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">hBrushSel</span> <span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = <span style="color: #00C800;">nil</span><br /> oRBGroup:<span style="color: #000000;">hBrushSel</span> = <span style="color: #00C800;">nil</span><br /> <br /> hBmp = GradientBmp<span style="color: #000000;">(</span> oRBGroup, oRBGroup:<span style="color: #000000;">nWidth</span>, oRBGroup:<span style="color: #000000;">nHeight</span>, aGrad1 <span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /> <br /> hBright = BrightImg<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, hBmp, <span style="color: #000000;">20</span> <span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #000000;">hBrushSel</span> := CreatePatternBrush<span style="color: #000000;">(</span> hBright <span style="color: #000000;">)</span><br /> <br /> DeleteObject<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span> <br /> DeleteObject<span style="color: #000000;">(</span> hBright<span style="color: #000000;">)</span> <br /> oRBGroup:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> ChangeGrad1<span style="color: #000000;">(</span> oGrad, oRBGroup <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> aGrad1<br /> <span style="color: #00C800;">local</span> hBmp, hBright<br /> <br /> aGrad1 = oGrad:<span style="color: #000000;">aGradOut</span><br /> oRBGroup:<span style="color: #000000;">aGradSel</span> = aGrad1<br /> DeleteObject<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">hBrushSel</span> <span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = <span style="color: #00C800;">nil</span><br /> oRBGroup:<span style="color: #000000;">hBrushSel</span> = <span style="color: #00C800;">nil</span><br /> <br /> hBmp = GradientBmp<span style="color: #000000;">(</span> oRBGroup, oRBGroup:<span style="color: #000000;">nWidth</span>, oRBGroup:<span style="color: #000000;">nHeight</span>, aGrad1 <span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span><br /> <br /> hBright = BrightImg<span style="color: #000000;">(</span> oRBGroup:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, hBmp, <span style="color: #000000;">20</span> <span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #000000;">hBrushSel</span> := CreatePatternBrush<span style="color: #000000;">(</span> hBright <span style="color: #000000;">)</span><br /> <br /> DeleteObject<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span> <br /> DeleteObject<span style="color: #000000;">(</span> hBright<span style="color: #000000;">)</span> <br /> oRBGroup:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> FREOPEN_STDERR <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HB_LONG <span style="color: #000000;">)</span> freopen<span style="color: #000000;">(</span> hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, stderr <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span> <br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:1dah32lj]
Also this change is needed in Class TRBtn so tooltips source code is generated also:
[code=fw:1dah32lj]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /> ...<br /><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">cToolTip</span> <span style="color: #000000;">)</span><br /> cCode += <span style="color: #ff0000;">' TOOLTIP "'</span> + ::<span style="color: #000000;">cToolTip</span> + <span style="color: #ff0000;">'"'</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /> cCode += CRLF <br /> <br /><span style="color: #00C800;">return</span> cCode <br /> </div>[/code:1dah32lj] |
ribonbar tolltip not showing | Antonio
The define button is in the init method , i did not show all the code
I can not see whete to apply the change in the trbtn.prg , in which method ?
Thanks for your help,
Richard |
ribonbar tolltip not showing | Richard,
Please build the rbdesign.prg that I have provided and let me know if tooltips show fine in it, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
That change is for method cGenPrg() but it will not affect your code, only the generation of PRG code from rbdesign.prg |
ricerca programmatore | SI ricerca programmatore per rifacimento funzione decompilata dal CA-Clipper d in un vecchio programma dos |
ricerca programmatore | Puoi dare maggiori dettagli? Di che si tratta, codice sorgente, compenso.
EMG |
rich3d20.dll | è possibile sapere dove andare a vedere tute le funzioni che questa dll supporta? per esempio potrebbe creare i paragrafi come in word ?
e le tabelle le puo' creare ?
silvio |
rich3d20.dll | Sulla MSDN alla voce "Rich Edit Control Reference".
EMG |
rich3d20.dll | grazie...
io avrei coem gia detto anche un altro file rtfpreview.prg ma non so se linares vuole che lo dico oppure lo posso pubblicare e dare agli altri che faccio ? Non mi ricordo chi me lo ha dato anni addietro... e dato che linares è uno degli autori non so se faccio bene a farlo scaricare anche agli altri dato che lui stesso non l'ha inserito nelle fw o meglio nelle nuove librerie 2.7 non so se l'ha inserito, perchè non ce le ho, mi dai conferma se c'è queta classe ?
silvio |
rich3d20.dll | No, non c'è. Ti conviene chiedere direttamente ad Antonio.
EMG |
rich3d20.dll | Ho risolto.
Non posso fare niente .
Ho due versioni della classe rtf una di OZS ( prima della litigata con linares) e l'altra quella della ultima versione di fw.
Quindi il richpad funzionerebbe anche con l'anteprima di stampa mentre la seconda ha solo la stampa diretta.
Ho provato ad inserire solo il metodo dell'anteprima e compilare il tutto ovviamente inserendo la caase di anteprima che non è altro che una rprevie.
non si compila perchè non trova queste funzioni .
[code:29f0i2ki]Error: Unresolved external '_HB_FUN_PAGEGETMARGINS' referenced from C:\WORK\PRG\PROVARTF\OBJ\RICHPREV.OBJ
Error: Unresolved external '_HB_FUN_PRNGETPAGENUMS' referenced from C:\WORK\PRG\PROVARTF\OBJ\RICHPREV.OBJ
Error: Unresolved external '_HB_FUN_PRNGETCOLLATE' referenced from C:\WORK\PRG\PROVARTF\OBJ\RICHPREV.OBJ[/code:29f0i2ki]
sapete qualcosa in merito ? |
rich3d20.dll | Sono tre funzioni presenti nella printdc.c dell'attuale versione delle FWH.
EMG |
rich3d20.dll | strano dovrebbe prenderle ....allora |
rich3d20.dll | le funzioni sono state chiamate in un altro modo
ho dovuto sotituire prnget margins perchè non c'è lafunzione
adesso l'anteprima dell'rtf funziona egregiamente sono che i margini non sono stati settati come scritto sopra.
Mi facciouna captina sul file per vedere se posso modificare questo inconveniente e vi faccio sapere: appena finito vi posto i files.
silvio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.