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;">&#40;</span> <span style="color: #ff0000;">"GET"</span>, MyURL, .T.<span style="color: #000000;">&#41;</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;">&#40;</span>dFecha1, cHora1, dFecha2, cHora2<span style="color: #000000;">&#41;</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;">&#40;</span>cHora1<span style="color: #000000;">&#41;</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;">&#40;</span>dFecha2<span style="color: #000000;">&#41;</span><br />  dFecha2 := DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</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;">&#40;</span>cHora2<span style="color: #000000;">&#41;</span><br />  cHora2 := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>TIME<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">IF</span> VALTYPE<span style="color: #000000;">&#40;</span>dFecha1<span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"D"</span> .OR. VALTYPE<span style="color: #000000;">&#40;</span>dFecha2<span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"D"</span> .OR. VALTYPE<span style="color: #000000;">&#40;</span>cHora1<span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"C"</span> .OR. VALTYPE<span style="color: #000000;">&#40;</span>cHora2<span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"C"</span> .OR. EMPTY<span style="color: #000000;">&#40;</span>dFecha1<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</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;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cHora2,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />nMinutp := VAL<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cHora2,<span style="color: #000000;">4</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />nHorasa := VAL<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cHora1,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />nMinuta := VAL<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cHora1,<span style="color: #000000;">4</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</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;">&#40;</span>nHoras * <span style="color: #000000;">60</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>nDias* <span style="color: #000000;">24</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</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&#58;//computerhistory&#46;org/blog/microsoft-word-for-windows-1-1a-source-code/[/url:24ugy1mz] [url:24ugy1mz]https&#58;//github&#46;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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBrw, oBar, oFont, n<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oRange, &nbsp;u<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSheet<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow, nCol, nRows, nCols, xValue<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cHeaders := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nSizes &nbsp; := <span style="color: #000000;">&#123;</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;">&#125;</span><br /><br /><br /><br />&nbsp; &nbsp;SET DATE ITALIAN<br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//fwNumFormat( 'E', .t. )</span><br /><br /><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<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 />&nbsp; &nbsp;oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;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 />&nbsp; &nbsp;oRange &nbsp; := GetExcelRange<span style="color: #000000;">&#40;</span> ExePath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"test.xls"</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp;<br />&nbsp; &nbsp; &nbsp; oSheet := oRange:<span style="color: #000000;">WorkSheet</span><br />&nbsp; &nbsp; &nbsp; nRows := oSheet:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Rows</span>:<span style="color: #0000ff;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nCols := oSheet:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Columns</span>:<span style="color: #0000ff;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nRow := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nRows<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCols<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xValue := oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nRow,nCol<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> xValue = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nRow,nCol<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" "</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// replace nil with space</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Next</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span> I<br /><br /><br /><br /><br /><br /><br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; DATASOURCE oRange CELL LINES FOOTERS ;<br />&nbsp; &nbsp; &nbsp; HEADERS cHeaders ;<br />&nbsp; &nbsp; &nbsp; SIZES nSizes<br /><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> &nbsp; := oBrw<br /><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp;oRange:<span style="color: #000000;">WorkSheet</span>:<span style="color: #000000;">Parent</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span> &nbsp; <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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> cFilePath<span style="color: #000000;">&#40;</span> GetModuleFileName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</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;">&#40;</span>ByVal address As Uri<span style="color: #000000;">&#41;</span> As Date<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim request As System.Net.HttpWebRequest<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim response As System.Net.HttpWebResponse = Nothing<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim dat As Date<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Try</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">' Create the web request &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request = DirectCast(System.Net.WebRequest.Create(address), System.Net.HttpWebRequest)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span> <span style="color: #0000ff;">Get</span> response &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; response = DirectCast<span style="color: #000000;">&#40;</span>request.GetResponse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, System.Net.HttpWebResponse<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dat = response.Headers.Item<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Last-Modified"</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">'response.Headers.Item("Content-Length")<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Finally<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If Not response Is Nothing Then response.Close()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End Try<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Return dat<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; 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;">&#40;</span> cWideStr <span style="color: #000000;">&#41;</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;">&#40;</span> OCRFROMFILEUSINGTRANSYM <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</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;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> ? hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> : 0x00000000 ;<br />   long            Orientation = HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> ? hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> : <span style="color: #000000;">TOCRJOBORIENT_AUTO</span>; <br />   long            ErrorMode   = HB_ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> ? hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> : <span style="color: #000000;">TOCRERRORMODE_LOG</span> ; <br />   HB_WCHAR        Msg<span style="color: #000000;">&#91;</span><span style="color: #000000;">10240</span><span style="color: #000000;">&#93;</span>;      <span style="color: #B900B9;">//<==Wide string that I later want to return</span><br />   char * InputFile = <span style="color: #000000;">&#40;</span> char * <span style="color: #000000;">&#41;</span> hb_parcx<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</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;">&#91;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#93;</span>;<br /><br /><br />...<br /><br />   hb_retc<span style="color: #000000;">&#40;</span> Msg <span style="color: #000000;">&#41;</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;">&#40;</span> cMsg <span style="color: #000000;">&#41;</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;">&#40;</span>$<span style="color: #000000;">&#40;</span>HB_COMPILER<span style="color: #000000;">&#41;</span>,xharbour<span style="color: #000000;">&#41;</span><br />PRG_OBJS = ./obj/bar.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">button</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">checkbox</span>.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">combobox</span>.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/control.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/database.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/dbtools.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">dialog</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/errsys.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/file.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/filename.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">folder</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">font</span>.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/form.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">get</span>.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/group.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/harbour.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">image</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/ini.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">listbox</span>.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./obj/memoedit.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">menu</span>.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">menuitem</span>.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/mget.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/msgbar.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/pdmenu.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">printer</span>.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/progres.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">radio</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/radmenu.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">say</span>.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/scrollbar.o &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">timer</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/valblank.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/wbrowse.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp;./obj/wbcolumn.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./obj/<span style="color: #0000ff;">window</span>.o<br /><span style="color: #00C800;">else</span><br />PRGX_OBJS = ./objx/bar.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">button</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">checkbox</span>.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">combobox</span>.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/control.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">dialog</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/errsys.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/file.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">folder</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">font</span>.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/form.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">get</span>.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/group.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/harbour.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">image</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">listbox</span>.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">menu</span>.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">menuitem</span>.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/mget.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/msgbar.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/pdmenu.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">printer</span>.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/progres.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">radio</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/radmenu.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">say</span>.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/scrollbar.o &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">timer</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/valblank.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/wbrowse.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/wbcolumn.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objx/<span style="color: #0000ff;">window</span>.o<br /><br /><span style="color: #00C800;">endif</span><br /><br />C_OBJS = ./objc/bars.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/buttons.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/checkboxes.o &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/comboboxes.o &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/<span style="color: #0000ff;">dialogs</span>.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/files.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/folders.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/fonts.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/getcolor.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/getfile.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/getfont.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/gets.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/groups.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/<span style="color: #0000ff;">images</span>.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/listboxes.o &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/lnx.o &nbsp; &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/menus.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/mgets.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/mouse.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp;./objc/msgbars.o &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/msgbox.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/printers.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/<span style="color: #0000ff;">progress</span>.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/radios.o &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/says.o &nbsp; &nbsp; &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/scrollbars.o &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/spawn.o &nbsp; &nbsp; &nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/strtoken.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./objc/wbrowses.o &nbsp; &nbsp;\<br />&nbsp; &nbsp; &nbsp;./objc/windows.o<br /><br />./lib/libfive.a &nbsp;: $<span style="color: #000000;">&#40;</span>PRG_OBJS<span style="color: #000000;">&#41;</span><br /><br />ifneq <span style="color: #000000;">&#40;</span>$<span style="color: #000000;">&#40;</span>HB_COMPILER<span style="color: #000000;">&#41;</span>,xharbour<span style="color: #000000;">&#41;</span><br /><br />&nbsp; ./lib/libfivec.a : $<span style="color: #000000;">&#40;</span>C_OBJS<span style="color: #000000;">&#41;</span><br /><br />./obj/%.c : ./source/classes/%.prg<br />&nbsp; &nbsp; ./../harbour/bin/harbour $< -o./$@ -n -I./../harbour/include -I./include<br /><br />./obj/%.c : ./source/<span style="color: #00C800;">function</span>/%.prg<br />&nbsp; &nbsp; ./../harbour/bin/harbour $< -o./$@ -n -I./../harbour/include -I./include<br /><br /><br />./obj/%.o : ./obj/%.c<br />&nbsp; &nbsp; gcc -c -D_HARBOUR_ -o $@ -I./../harbour/include -I./include $<<br />&nbsp; &nbsp; ar rc ./lib/libfive.a $@<br /><br /><span style="color: #00C800;">else</span><br /><br />&nbsp;./lib/libfivex.a : $<span style="color: #000000;">&#40;</span>PRGX_OBJS<span style="color: #000000;">&#41;</span><br /><br />./objx/%.c : ./source/classes/%.prg<br />&nbsp; &nbsp; &nbsp; &nbsp; ./../xharbour/bin/harbour $< -o./$@ -n -I./../xharbour/include -I./include<br /><br />./objx/%.c : ./source/<span style="color: #00C800;">function</span>/%.prg<br />&nbsp; &nbsp; &nbsp; &nbsp; ./../xharbour/bin/harbour $< -o./$@ -n -I./../xharbour/include -I./include<br /><br />./objx/%.o : ./objx/%.c<br />&nbsp; &nbsp; &nbsp; &nbsp; gcc -c -o $@ -I./../xharbour/include $<<br />&nbsp; &nbsp; &nbsp; &nbsp; 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 />&nbsp; &nbsp; gcc &nbsp;-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 />&nbsp; &nbsp; ar rc ./lib/libfivec.a $@<br /><br />./objc/%.o : ./source/winapi/%.c<br />&nbsp; &nbsp; 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 />&nbsp; &nbsp; ar rc ./lib/libfivec.a $@<br /><br />./objc/%.o : ./source/internal/%.c<br />&nbsp; &nbsp; 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 />&nbsp; &nbsp; ar rc ./lib/libfivec.a $@<br />&nbsp;</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;">&#40;</span> SAYSETANGLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;GtkWidget * hWnd = <span style="color: #000000;">&#40;</span> GtkWidget * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; GList * children = gtk_container_get_children<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GtkContainer * <span style="color: #000000;">&#41;</span> hWnd <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;gtk_label_set_angle<span style="color: #000000;">&#40;</span> &nbsp;children->data , &nbsp;hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />en <span style="color: #0000ff;">say</span>.prg<br />&nbsp; <span style="color: #00C800;">METHOD</span> setangle<span style="color: #000000;">&#40;</span>nAngle<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> SaySetAngle<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>,nAngle<span style="color: #000000;">&#41;</span><br /><br />&nbsp;</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;">&#40;</span> PROSETVERTICAL <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;GtkWidget * hWnd = <span style="color: #000000;">&#40;</span> GtkWidget * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;gtk_progress_bar_set_orientation<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GtkProgressBar * <span style="color: #000000;">&#41;</span> hWnd, GTK_PROGRESS_BOTTOM_TO_TOP <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />en progres.prg<br /><br />&nbsp;<span style="color: #00C800;">METHOD</span> SetVertical<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ProSetVertical<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp;</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&#46;ch" #include "Dbfown&#46;ch" static oWnd //----------------------------------------------------------------------------// function Main&#40;&#41; SET _3DLOOK ON DEFINE WINDOW oWnd FROM 2, 2 TO 20, 70 ; TITLE "Testing DataBase Objects" ; MENU BuildMenu&#40;&#41; SET MESSAGE OF oWnd ; TO "FiveWin - Object Oriented DataBase Management" CENTERED oWnd&#58;bLDblClick = &#123; || MsgInfo&#40; "Double Left Click" &#41; &#125; ACTIVATE WINDOW oWnd MAXIMIZED ; VALID MsgYesNo&#40; "Do you really want to end ?" &#41; return nil //----------------------------------------------------------------------------// function BuildMenu&#40;&#41; local oMenu MENU oMenu MENUITEM "&Clients" MENU MENUITEM "&Record by Record&#46;&#46;&#46;" ACTION ClientsRec&#40;&#41; ; MESSAGE "Clients record by record management dialog" MENUITEM "&Browse&#46;&#46;&#46;" ACTION ClientsBrowse&#40;&#41; ; MESSAGE "Clients browse management dialog" SEPARATOR MENUITEM "&Exit Test&#46;&#46;&#46;" ACTION oWnd&#58;End&#40;&#41; ; MESSAGE "End doing this tutorial" ENDMENU ENDMENU return oMenu //----------------------------------------------------------------------------// function ClientsRec&#40;&#41; local oDbf, oDlg local oBtnNew&#58;="&New", oBtnTop&#58;="&Top", ; oBtnPrev&#58;="&Previous", oBtnNext&#58;="&Next", oBtnBottom&#58;="&bottom", oBtnEnd&#58;="&End" local aButtons local lNew &#58;= &#46;f&#46; 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&#58;bEoF = nil // We don't want default EOF processing DEFINE DIALOG oDlg FROM 8, 2 TO 600, 700 PIXEL ; TITLE &#40;"Customer" &#41; @ 1,2 SAY "&First" OF oDlg PIXEL @ 1,50 SAY "&#58;" OF oDlg PIXEL @ 1,60 GET oDbf&#58;First OF oDlg PIXEL @ 15,1 SAY "&Name" OF oDlg PIXEL @ 15,50 SAY "&#58;" OF oDlg PIXEL @ 15,60 GET oDbf&#58;Last OF oDlg PIXEL @ 280, 10 BUTTON oBtnNew OF oDlg PIXEL SIZE 30, 12 ; ACTION New&#40; @lNew, oDbf, aButtons, oDlg &#41; ; MESSAGE "Add a new customer" @ 280, 50 BUTTON oBtnTop OF oDlg PIXEL SIZE 30, 12 ; ACTION Top&#40; @lNew, oDbf, aButtons, oDlg &#41; ; MESSAGE "Go to the first record of the DataBase" @ 280, 100 BUTTON oBtnPrev OF oDlg PIXEL SIZE 30, 12 ; ACTION &#40; oDbf&#58;Skip&#40; -1 &#41;, oDlg&#58;Update&#40;&#41; &#41; ; MESSAGE "Go to the previous record of the DataBase" @ 280, 150 BUTTON oBtnNext OF oDlg PIXEL SIZE 30, 12 ; ACTION &#40; oDbf&#58;Skip&#40;&#41;,; If&#40; oDbf&#58;Eof&#40;&#41;, &#40; MsgStop&#40; "EoF" &#41;, oDbf&#58;GoBottom&#40;&#41; &#41;,; oDlg&#58;Update&#40;&#41; &#41; &#41; ; MESSAGE "Go to the next record of the DataBase" @ 280, 200 BUTTON oBtnBottom OF oDlg PIXEL SIZE 30, 12 ; ACTION &#40; oDbf&#58;GoBottom&#40;&#41;, oDlg&#58;Update&#40;&#41; &#41; ; MESSAGE "Go to the last record of the DataBase" @ 280, 250 BUTTON oBtnEnd OF oDlg PIXEL SIZE 30, 12 ; ACTION oDlg&#58;End&#40;&#41; ; MESSAGE "End this dialog" aButtons = &#123; oBtnNew, oBtnTop, oBtnPrev, oBtnNext, oBtnBottom, oBtnEnd &#125; ACTIVATE DIALOG oDlg CENTERED ; ON INIT &#40; oDlg&#58;Update&#40;&#41; &#41; USE return nil //----------------------------------------------------------------------------// function New&#40; lNew, oDbf, aButtons, oDlg &#41; local n if ! lNew aButtons&#91; 1 &#93;&#58;SetText&#40; "&Save" &#41; aButtons&#91; 2 &#93;&#58;SetText&#40; "&Cancel" &#41; for n = 3 to Len&#40; aButtons &#41; aButtons&#91; n &#93;&#58;Disable&#40;&#41; next oDbf&#58;Blank&#40;&#41; // we 'clean' the DataBase buffer oDlg&#58;Update&#40;&#41; // we refresh the controls oDlg&#58;aControls&#91; 1 &#93;&#58;SetFocus&#40;&#41; // we give focus to the first GET else oDbf&#58;Append&#40;&#41; // The user selected 'save' oDbf&#58;Save&#40;&#41; // we copy from the DataBase buffer into the 'real' DBF aButtons&#91; 1 &#93;&#58;SetText&#40; "&New" &#41; aButtons&#91; 2 &#93;&#58;SetText&#40; "&Top" &#41; for n = 3 to Len&#40; aButtons &#41; aButtons&#91; n &#93;&#58;Enable&#40;&#41; next endif lNew = ! lNew // we toggle the lNew value return nil //----------------------------------------------------------------------------// function Top&#40; lNew, oDbf, aButtons, oDlg &#41; local n if ! lNew // the user wants to GO TOP oDbf&#58;GoTop&#40;&#41; oDlg&#58;Update&#40;&#41; // we repaint the controls containts else // the user canceled the 'New' option oDbf&#58;Load&#40;&#41; // reload again fields info from the DBF oDlg&#58;Update&#40;&#41; // we repaint the controls contains aButtons&#91; 1 &#93;&#58;SetText&#40; "&New" &#41; aButtons&#91; 2 &#93;&#58;SetText&#40; "&Top" &#41; for n = 3 to Len&#40; aButtons &#41; aButtons&#91; n &#93;&#58;Enable&#40;&#41; next lNew = &#46;f&#46; endif return nil //----------------------------------------------------------------------------// function ClientsBrowse&#40;&#41; local oDlg, oDbf, oBrw, oFnt USE customer DATABASE oDbf DEFINE DIALOG oDlg RESOURCE "Browse" REDEFINE LISTBOX oBrw ; FIELDS oDbf&#58;first, oDbf&#58;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&#58;Name and oDbf&#58;Adress in the above FIELDS &#46;&#46;&#46; clause oBrw&#58;bSkip = &#123; | nRecs | oDbf&#58;Skipper&#40; nRecs &#41; &#125; oBrw&#58;lAutoEdit = &#46;T&#46; oBrw&#58;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&#46;ch" static oWnd //----------------------------------------------------------------------------// function Main&#40;&#41; SET _3DLOOK ON DEFINE WINDOW oWnd FROM 2, 2 TO 20, 70 ; TITLE "Testing DataBase Objects" ; MENU BuildMenu&#40;&#41; SET MESSAGE OF oWnd ; TO "FiveWin - Object Oriented DataBase Management" CENTERED oWnd&#58;bLDblClick = &#123; || MsgInfo&#40; "Double Left Click" &#41; &#125; ACTIVATE WINDOW oWnd MAXIMIZED ; VALID MsgYesNo&#40; "Do you really want to end ?" &#41; return nil //----------------------------------------------------------------------------// function BuildMenu&#40;&#41; local oMenu MENU oMenu MENUITEM "&Clients" MENU MENUITEM "&Record by Record&#46;&#46;&#46;" ACTION ClientsRec&#40;&#41; ; MESSAGE "Clients record by record management dialog" MENUITEM "&Browse&#46;&#46;&#46;" ACTION ClientsBrowse&#40;&#41; ; MESSAGE "Clients browse management dialog" SEPARATOR MENUITEM "&Exit Test&#46;&#46;&#46;" ACTION oWnd&#58;End&#40;&#41; ; MESSAGE "End doing this tutorial" ENDMENU ENDMENU return oMenu //----------------------------------------------------------------------------// function ClientsRec&#40;&#41; local oDbf, oDlg local oBtnNew, oBtnTop, oBtnPrev, oBtnNext, oBtnBottom, oBtnEnd local aButtons local lNew &#58;= &#46;f&#46; 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&#58;bEoF = nil // We don't want default EOF processing DEFINE DIALOG oDlg FROM 8, 2 TO 600, 700 PIXEL ; TITLE &#40;"Customer" &#41; @ 1,2 SAY "&First" OF oDlg PIXEL @ 1,50 SAY "&#58;" OF oDlg PIXEL @ 1,60 GET oDbf&#58;First OF oDlg PIXEL UPDATE @ 15,1 SAY "&Name" OF oDlg PIXEL @ 15,50 SAY "&#58;" OF oDlg PIXEL @ 15,60 GET oDbf&#58;Last OF oDlg PIXEL UPDATE @ 280, 10 BUTTON oBtnNew PROMPT "&New" OF oDlg PIXEL SIZE 30, 12 ; ACTION New&#40; @lNew, oDbf, aButtons, oDlg &#41; ; MESSAGE "Add a new customer" @ 280, 50 BUTTON oBtnTop PROMPT "&Top" OF oDlg PIXEL SIZE 30, 12 ; ACTION Top&#40; @lNew, oDbf, aButtons, oDlg &#41; ; MESSAGE "Go to the first record of the DataBase" @ 280, 100 BUTTON oBtnPrev PROMPT "&Previous" OF oDlg PIXEL SIZE 30, 12 ; ACTION &#40; oDbf&#58;Skip&#40; -1 &#41;, oDlg&#58;Update&#40;&#41; &#41; ; MESSAGE "Go to the previous record of the DataBase" @ 280, 150 BUTTON oBtnNext PROMPT "&Next" OF oDlg PIXEL SIZE 30, 12 ; ACTION &#40; oDbf&#58;Skip&#40;&#41;,; If&#40; oDbf&#58;Eof&#40;&#41;, &#40; MsgStop&#40; "EoF" &#41;, oDbf&#58;GoBottom&#40;&#41; &#41;,; oDlg&#58;Update&#40;&#41; &#41; &#41; ; MESSAGE "Go to the next record of the DataBase" @ 280, 200 BUTTON oBtnBottom PROMPT "&Bottom" OF oDlg PIXEL SIZE 30, 12 ; ACTION &#40; oDbf&#58;GoBottom&#40;&#41;, oDlg&#58;Update&#40;&#41; &#41; ; MESSAGE "Go to the last record of the DataBase" @ 280, 250 BUTTON oBtnEnd PROMPT "&End" OF oDlg PIXEL SIZE 30, 12 ; ACTION oDlg&#58;End&#40;&#41; ; MESSAGE "End this dialog" aButtons &#58;= &#123; oBtnNew, oBtnTop, oBtnPrev, oBtnNext, oBtnBottom, oBtnEnd &#125; ACTIVATE DIALOG oDlg CENTERED ; ON INIT &#40; oDlg&#58;Update&#40;&#41; &#41; USE return nil //----------------------------------------------------------------------------// function New&#40; lNew, oDbf, aButtons, oDlg &#41; local n if ! lNew aButtons&#91; 1 &#93;&#58;SetText&#40; "&Save" &#41; aButtons&#91; 2 &#93;&#58;SetText&#40; "&Cancel" &#41; for n = 3 to Len&#40; aButtons &#41; aButtons&#91; n &#93;&#58;Disable&#40;&#41; next oDbf&#58;Blank&#40;&#41; // we 'clean' the DataBase buffer oDlg&#58;Update&#40;&#41; // we refresh the controls oDlg&#58;aControls&#91; 1 &#93;&#58;SetFocus&#40;&#41; // we give focus to the first GET else oDbf&#58;Append&#40;&#41; // The user selected 'save' oDbf&#58;Save&#40;&#41; // we copy from the DataBase buffer into the 'real' DBF aButtons&#91; 1 &#93;&#58;SetText&#40; "&New" &#41; aButtons&#91; 2 &#93;&#58;SetText&#40; "&Top" &#41; for n = 3 to Len&#40; aButtons &#41; aButtons&#91; n &#93;&#58;Enable&#40;&#41; next endif lNew = ! lNew // we toggle the lNew value return nil //----------------------------------------------------------------------------// function Top&#40; lNew, oDbf, aButtons, oDlg &#41; local n if ! lNew // the user wants to GO TOP oDbf&#58;GoTop&#40;&#41; oDlg&#58;Update&#40;&#41; // we repaint the controls containts else // the user canceled the 'New' option oDbf&#58;Load&#40;&#41; // reload again fields info from the DBF oDlg&#58;Update&#40;&#41; // we repaint the controls contains aButtons&#91; 1 &#93;&#58;SetText&#40; "&New" &#41; aButtons&#91; 2 &#93;&#58;SetText&#40; "&Top" &#41; for n = 3 to Len&#40; aButtons &#41; aButtons&#91; n &#93;&#58;Enable&#40;&#41; next lNew = &#46;f&#46; endif return nil //----------------------------------------------------------------------------// function ClientsBrowse&#40;&#41; local oDlg, oDbf, oBrw, oFnt USE customer DATABASE oDbf DEFINE DIALOG oDlg RESOURCE "Browse" REDEFINE LISTBOX oBrw ; FIELDS oDbf&#58;first, oDbf&#58;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&#58;Name and oDbf&#58;Adress in the above FIELDS &#46;&#46;&#46; clause oBrw&#58;bSkip = &#123; | nRecs | oDbf&#58;Skipper&#40; nRecs &#41; &#125; oBrw&#58;lAutoEdit = &#46;T&#46; oBrw&#58;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&#40;&#41; local oDlg, oDbf, oBrw, oFnt USE customer DATABASE oDbf @ 10,20 LISTBOX oBrw; FIELDS oDbf&#58;first, oDbf&#58;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&#58;Name and oDbf&#58;Adress in the above FIELDS &#46;&#46;&#46; clause oBrw&#58;bSkip = &#123; | nRecs | oDbf&#58;Skipper&#40; nRecs &#41; &#125; oBrw&#58;lAutoEdit = &#46;T&#46; oBrw&#58;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&#40;&#41; 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&#58;first, oDbf&#58;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&#58;Name and oDbf&#58;Adress in the above FIELDS &#46;&#46;&#46; clause oBrw&#58;bSkip = &#123; | nRecs | oDbf&#58;Skipper&#40; nRecs &#41; &#125; oBrw&#58;lAutoEdit = &#46;T&#46; oBrw&#58;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&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?p=84673#p84673[/url:1qilpt5a] [url:1qilpt5a]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;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&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/re&#46;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;"> &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">200</span> SPLITTER oSplit ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VERTICAL</span> _3DLOOK ;<br />&nbsp; &nbsp; &nbsp; PREVIOUS CONTROLS oTree ;<br />&nbsp; &nbsp; &nbsp; HINDS CONTROLS oMemo ; <br />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oWndRC<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;oSplit:<span style="color: #000000;">AdjClient</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:331w16zp] Esto es importante: [code=fw:331w16zp]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndRC ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> RESIZE oSplit:<span style="color: #000000;">AdjClient</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</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;">&#40;</span><span style="color: #000000;">&#41;</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;">&#91;</span> <span style="color: #000000;">02</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp;bitmap <span style="color: #ff0000;">"A"</span>;<br />&nbsp; &nbsp;<span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Descendencia"</span> GROUP ::<span style="color: #000000;">oGrp</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">01</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">action</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#41;</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;">&#91;</span> <span style="color: #000000;">02</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp;bitmap <span style="color: #ff0000;">"A"</span>;<br />&nbsp; &nbsp;<span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Descendencia"</span> GROUP ::<span style="color: #000000;">oGrp</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">01</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">action</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#41;</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 />&nbsp; &nbsp;<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 />&nbsp; &nbsp; 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 />&nbsp; &nbsp;@<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;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp;</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&#58;//www&#46;bergland&#46;info/fivewin/Clip10&#46;jpg[/img:10hi3usr] [img:10hi3usr]http&#58;//www&#46;bergland&#46;info/fivewin/Clip11&#46;jpg[/img:10hi3usr] [img:10hi3usr]http&#58;//www&#46;bergland&#46;info/fivewin/Clip12&#46;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;">&#91;</span> <oRBar> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <of:<span style="color: #0000ff;">OF</span>, WINDOW> <oWnd> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <prm: <span style="color: #0000ff;">PROMPT</span>, <span style="color: #0000ff;">PROMPTS</span>, ITEMS> <cPrompt,...> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <act: <span style="color: #0000ff;">ACTION</span>, EXECUTE, <span style="color: #0000ff;">ON</span> CHANGE> <uAction> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> OPTION <nOption> <span style="color: #000000;">&#93;</span> ;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> HEIGHT <nHeight> <span style="color: #000000;">&#93;</span> ;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> TOPMARGIN <nTopMargin> <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">COLOR</span> <nClrPane> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <ColorBox: <span style="color: #000000;">COLORBOX</span>> <nClrBoxOut>,<nClrBoxIn> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <ColorSel: <span style="color: #000000;">COLORSEL</span>> <nClrBoxSelOut>,<nClrBoxSelIn> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <l2010: <span style="color: #000000;">2010</span>, _2010> <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <l2013: <span style="color: #000000;">2013</span>, _2013> <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> STARTBTN <nStart> <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;=> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span><oRBar> := <span style="color: #000000;">&#93;</span> TRibbonBar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <oWnd>, <span style="color: #000000;">&#91;</span>\<span style="color: #000000;">&#123;</span><cPrompt>\<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#123;</span>|nOption,nOldOption|<uAction><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#93;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nOption>, , <nHeight>, <nTopMargin>, <nClrPane>, <nClrBoxOut>, <nClrBoxIn>, <nClrBoxSelOut>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nClrBoxSelIn>, , , , , <.l2010.>, <nStart>, <.l2013.> <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</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&#58;//es&#46;zimagez&#46;com/zimage/windows20&#46;php:2jfoaqkp][img:2jfoaqkp]http&#58;//es&#46;zimagez&#46;com/miniature/windows20&#46;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&#58;//imgbb&#46;com/:rw8fi64d][img:rw8fi64d]https&#58;//image&#46;ibb&#46;co/dR6b5k/Dibujo&#46;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;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TRibbonBar<br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClickQ</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span> .and. ::<span style="color: #000000;">lOverQ</span><br />      Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClickQ</span>, nRow, nCol, nFlags <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClick</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span><br />      Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClick</span>, nRow, nCol, nFlags <span style="color: #000000;">&#41;</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;">&#40;</span><span style="color: #000000;">&#41;</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;">&#40;</span> oWnd <span style="color: #000000;">&#41;</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;">&#40;</span> oWnd <span style="color: #000000;">&#41;</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;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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;">&#41;</span> <span style="color: #000000;">&#125;</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;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.9</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">199</span>, <span style="color: #000000;">216</span>, <span style="color: #000000;">237</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</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;">&#40;</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">&#41;</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;">&#40;</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">&#41;</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;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.9</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">199</span>, <span style="color: #000000;">216</span>, <span style="color: #000000;">237</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</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;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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;">&#41;</span> <span style="color: #000000;">&#125;</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&#58;//img&#46;fenixzone&#46;net/i/b0XNSvl&#46;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;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TRibbonBar<br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClickQ</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span> .and. ::<span style="color: #000000;">lOverQ</span><br />      Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClickQ</span>, nRow, nCol, nFlags <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClick</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span><br />      Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLDblClick</span>, nRow, nCol, nFlags <span style="color: #000000;">&#41;</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;">&#40;</span><span style="color: #000000;">&#41;</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;">&#40;</span> oWnd <span style="color: #000000;">&#41;</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;">&#40;</span> oWnd <span style="color: #000000;">&#41;</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;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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;">&#41;</span> <span style="color: #000000;">&#125;</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;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.9</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">199</span>, <span style="color: #000000;">216</span>, <span style="color: #000000;">237</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</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;">&#40;</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">&#41;</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;">&#40;</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">&#41;</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;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.9</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">199</span>, <span style="color: #000000;">216</span>, <span style="color: #000000;">237</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</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;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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;">&#41;</span> <span style="color: #000000;">&#125;</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 />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aClrMenu1 := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">69</span>, <span style="color: #000000;">124</span>, <span style="color: #000000;">188</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">93</span>, <span style="color: #000000;">171</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">136</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">56</span>, <span style="color: #000000;">135</span>, <span style="color: #000000;">191</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aClrMenu2 := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">123</span>, <span style="color: #000000;">178</span>, <span style="color: #000000;">236</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">71</span>, <span style="color: #000000;">126</span>, <span style="color: #000000;">205</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">17</span>, <span style="color: #000000;">78</span>, <span style="color: #000000;">175</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">225</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> RIBBONBAR oRBar <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp; &nbsp; HEIGHT <span style="color: #000000;">133</span> TOPMARGIN <span style="color: #000000;">25</span> <span style="color: #000000;">2013</span><br /><br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">nRoundBox</span> &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">nSeparation</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// &nbsp; BackStage( oRBar )</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">nLeftMargin</span> = <span style="color: #000000;">75</span><br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oTBtn0 = TRBtn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</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;">&#123;</span> || oRBar:<span style="color: #000000;">BackStage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">/* oRBar:KeybMode() */</span> <span style="color: #000000;">&#125;</span>, oRBar,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;,,,,,, .F., .T.,,,,,, <span style="color: #ff0000;">"POPUP"</span>, oMenu,,,,,,,,,,,,, aClrMenu1, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">125</span>, <span style="color: #000000;">172</span>, <span style="color: #000000;">215</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">65</span>, <span style="color: #000000;">106</span>, <span style="color: #000000;">189</span> <span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #000000;">nRoundBox</span>, <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;oTBtn0:<span style="color: #000000;">aClrGradOver</span> = <span style="color: #000000;">&#123;</span> || aClrMenu2 <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oTBtn0:<span style="color: #000000;">aClrGradBack</span> = aClrMenu2<br />&nbsp; &nbsp;oTBtn0:<span style="color: #000000;">bClrGradSubOver</span> = <span style="color: #000000;">&#123;</span> || aClrMenu2 <span style="color: #000000;">&#125;</span><br /><br />&nbsp;</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&#58;//www&#46;iispascalcomiforti&#46;it/wp-content/uploads/2017/04/nnnn&#46;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&#58;//img&#46;fenixzone&#46;net/i/a2cDWXd&#46;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;">&#123;</span> | lPressed | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lPressed,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">214</span>, <span style="color: #000000;">172</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">230</span>, <span style="color: #000000;">220</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</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;">&#40;</span><span style="color: #000000;">&#41;</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;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> &nbsp;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;">&#40;</span> <span style="color: #000000;">&#123;</span> || LFIN <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">IF</span> WNDRIB # <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;WNDRIB:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</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;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> GROUP TGR<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> BITMAP DIRAPPLI<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"BMP<span style="color: #000000;">\T</span>EXTE.BMP"</span>;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> xxxx<br />TBTN<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">CTOOLTIP</span> := <span style="color: #ff0000;">"Ajouter texte libre"</span> &nbsp; <span style="color: #B900B9;">// this is not showing</span><br /><br />&nbsp;</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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> TYPE_POPUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> TYPE_SPLITPOPUP &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> TYPE_SAYBUTTON &nbsp; &nbsp; &nbsp; &nbsp;<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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oRBar<br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<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 />&nbsp; &nbsp;SetRibbonEditable<span style="color: #000000;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br />&nbsp; &nbsp;<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;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, m, p, oGroup, oButton<br /><br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">bRClicked</span> = <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonBarOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBar, oRBar:<span style="color: #000000;">oWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bRClicked</span> = <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonDialogOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBar, oRBar:<span style="color: #000000;">oWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aControls</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> m = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGroup = oRBar:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> m <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGroup:<span style="color: #000000;">bRClicked</span> = GenGroupBlock<span style="color: #000000;">&#40;</span> oGroup <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oGroup:<span style="color: #000000;">aControls</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> p = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oButton = oGroup:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> p <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oButton:<span style="color: #000000;">bRClicked</span> = GenButtonBlock<span style="color: #000000;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp;<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;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonGroupOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBGroup <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</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;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonButtonOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oButton <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonBarOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBar, oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMenu<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Add a tab..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">AddTab</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"new"</span> <span style="color: #000000;">&#41;</span>, ATail<span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonDialogOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBar <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <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;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Delete tab..."</span> <span style="color: #0000ff;">ACTION</span> DeleteTab<span style="color: #000000;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oRBar:<span style="color: #000000;">lQuickRound</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"QuickButton"</span> <span style="color: #0000ff;">ACTION</span> BuildNewRibbon<span style="color: #000000;">&#40;</span> oRBar, <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"QuickButton"</span> <span style="color: #0000ff;">ACTION</span> oRBar := BuildNewRibbon<span style="color: #000000;">&#40;</span> oRBar, <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #000000;">QuickRoundBtn</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oRBar:<span style="color: #000000;">oQuickAcc</span> == <span style="color: #00C800;">nil</span> &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<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;">&#40;</span><span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<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;">&#40;</span><span style="color: #000000;">&#41;</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;">&#40;</span><span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Source code..."</span> <span style="color: #0000ff;">ACTION</span> MemoEdit<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"function BuildRibbonBar()"</span> + CRLF + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRBar:<span style="color: #000000;">cGenPrg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"return nil"</span> + CRLF + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRBar:<span style="color: #000000;">cGenButtonMenus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"source code"</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Save as..."</span> <span style="color: #0000ff;">ACTION</span> MemoWrit<span style="color: #000000;">&#40;</span> cGetFile<span style="color: #000000;">&#40;</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;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BuildRibbonCode<span style="color: #000000;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Load from..."</span> <span style="color: #0000ff;">ACTION</span> CompileRibbon<span style="color: #000000;">&#40;</span> oWnd, oRBar <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <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;">&#40;</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Do you want to start a new design ?"</span> <span style="color: #000000;">&#41;</span>, BuildNewRibbon<span style="color: #000000;">&#40;</span> oRBar, <span style="color: #000000;">25</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<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;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;cCode += <span style="color: #ff0000;">"function BuildRibbonBar( oWnd, _oRBar )"</span> + CRLF + CRLF<br />&nbsp; &nbsp;cCode += oRBar:<span style="color: #000000;">cGenPrg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cCode += <span style="color: #ff0000;">"return _oRBar := oRBar"</span> + CRLF + CRLF<br />&nbsp; &nbsp;cCode += oRBar:<span style="color: #000000;">cGenButtonMenus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> cCode &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> ButtonPosDim<span style="color: #000000;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BuildNewRibbon<span style="color: #000000;">&#40;</span> oRBar, nHeight <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd := oRBar:<span style="color: #000000;">oWnd</span><br /><br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nWidth</span>, oRBar:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SetRibbonEditable<span style="color: #000000;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> oRBar<br />&nbsp; &nbsp;<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonDialogOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBar <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMenu, oRBGroup<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Add a group..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRBGroup := oRBar:<span style="color: #000000;">AddGroup</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">200</span>, <span style="color: #ff0000;">"new"</span>, oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRBGroup:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonGroupOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBGroup <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">&#91;</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span> <span style="color: #00C800;">AT</span> nRow, nCol<br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonGroupOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oRBGroup <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMenu, oButton, bClick := <span style="color: #000000;">&#123;</span> | o | <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"click"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Add a button"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton := oRBGroup:<span style="color: #000000;">AddButton</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> .and. Len<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span>, ATail<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nRight</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</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;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oButton:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | RibbonButtonOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oButton <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit width..."</span> <span style="color: #0000ff;">ACTION</span> EditGroupWidth<span style="color: #000000;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit label..."</span> <span style="color: #0000ff;">ACTION</span> EditGroupLabel<span style="color: #000000;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Select colors..."</span> <span style="color: #0000ff;">ACTION</span> SelGroupColors<span style="color: #000000;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Delete group..."</span> <span style="color: #0000ff;">ACTION</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Are you sure ?"</span>, <span style="color: #ff0000;">"Delete this group"</span> <span style="color: #000000;">&#41;</span>, oRBGroup:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> RibbonButtonOptions<span style="color: #000000;">&#40;</span> nRow, nCol, oButton <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMenu, oPopup := oButton:<span style="color: #000000;">oPopup</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit prompt..."</span> <span style="color: #0000ff;">ACTION</span> EditButtonLabel<span style="color: #000000;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Edit tooltip..."</span> <span style="color: #0000ff;">ACTION</span> EditButtonToolTip<span style="color: #000000;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Select bitmap..."</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"*.bmp"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Popup menu..."</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oPopup := EditButtonMenu<span style="color: #000000;">&#40;</span> oButton, oPopup <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Set style"</span> <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_NORMAL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NORMAL"</span> &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_NORMAL, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NORMAL"</span> &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_NORMAL, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_POPUP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"POPUP"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_POPUP, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"POPUP"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_POPUP, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_SPLITPOPUP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SPLITPOPUP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SPLITPOPUP, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SPLITPOPUP"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SPLITPOPUP, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nTypeButton</span> == TYPE_SAYBUTTON<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SAYBUTTON"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SAYBUTTON, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SAYBUTTON"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">nTypeButton</span> := TYPE_SAYBUTTON, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Set layout"</span> <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"TOP"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"TOP"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"LEFT"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"LEFT"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"BOTTOM"</span> &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"BOTTOM"</span> &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"RIGHT"</span> &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"RIGHT"</span> &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTLEFT"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTLEFT"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTRIGHT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"MOSTRIGHT"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">nLayout</span> == <span style="color: #000000;">7</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"CENTER"</span> &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"CENTER"</span> &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span> <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Set border"</span> <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! oButton:<span style="color: #000000;">lBorder</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NOBORDER"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">lBorder</span> := .F., oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"NOBORDER"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">lBorder</span> := .F., oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">lBorder</span> .and. ! oButton:<span style="color: #000000;">lRound</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SQUARE BORDER"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SQUARE BORDER"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oButton:<span style="color: #000000;">lBorder</span> .and. oButton:<span style="color: #000000;">lRound</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"ROUNDED BORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CHECKED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"ROUNDED BORDER"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <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;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Delete button..."</span> <span style="color: #0000ff;">ACTION</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Are you sure ?"</span>, <span style="color: #ff0000;">"Delete this button"</span> <span style="color: #000000;">&#41;</span>, oButton:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; oButton:<span style="color: #000000;">oPopup</span> = oPopup<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> CompileRibbon<span style="color: #000000;">&#40;</span> oWnd, oRBar <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oHrb, cResult, bOldError, lError := .T. <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cCode := MemoRead<span style="color: #000000;">&#40;</span> cGetFile<span style="color: #000000;">&#40;</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;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cCode <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oRBar:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;FReOpen_Stderr<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"comp.log"</span>, <span style="color: #ff0000;">"w"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oHrb = HB_CompileFromBuf<span style="color: #000000;">&#40;</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;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> cResult := MemoRead<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"comp.log"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cResult <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oHrb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; BEGIN SEQUENCE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bOldError = ErrorBlock<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | DoBreak<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRBar = hb_HrbRun<span style="color: #000000;">&#40;</span> oHrb, oWnd, oRBar <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lError = .F.<br />&nbsp; &nbsp; &nbsp; END SEQUENCE &nbsp; <br />&nbsp; &nbsp; &nbsp; ErrorBlock<span style="color: #000000;">&#40;</span> bOldError <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lError<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; oRBar:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nWidth</span>, oRBar:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetRibbonEditable<span style="color: #000000;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp;<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;">&#40;</span> oError <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cInfo := oError:<span style="color: #000000;">operation</span>, n<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; cInfo += <span style="color: #ff0000;">" &nbsp; Args:"</span> + CRLF<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cInfo += <span style="color: #ff0000;">"["</span> + Str<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"] = "</span> + ValType<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">" &nbsp; "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> + CRLF<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;MsgStop<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Description</span> + CRLF + cInfo,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Script error at line: "</span> + Str<span style="color: #000000;">&#40;</span> ProcLine<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, nWidth := oRBGroup:<span style="color: #000000;">nWidth</span>, nOldWidth := nWidth<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oRBGroup:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nWidth, oRBGroup:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <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;">&#40;</span> oRBGroup:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nWidth, oRBGroup:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;@ <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;">&#40;</span> oRBGroup:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nOldWidth, oRBGroup:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">&#91;</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>, cOldLabel := oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">&#91;</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">&#91;</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span> := AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <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;">&#40;</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">&#91;</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span> := AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;@ <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;">&#40;</span> oRBar:<span style="color: #000000;">aPrompts</span><span style="color: #000000;">&#91;</span> oRBar:<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span> := cOldLabel, oRBar:<span style="color: #000000;">CalcPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRBar:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">&#40;</span> oRBar <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Are you sure ?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRBar:<span style="color: #000000;">DeleteTab</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; &nbsp;<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditGroupLabel<span style="color: #000000;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">cCaption</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>, cOldLabel := oRBGroup:<span style="color: #000000;">cCaption</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <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;">&#40;</span> oRBGroup:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;@ <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;">&#40;</span> oRBGroup:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cOldLabel <span style="color: #000000;">&#41;</span>, oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">cCaption</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>, cOldLabel := oButton:<span style="color: #000000;">cCaption</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <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;">&#40;</span> oButton:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;@ <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;">&#40;</span> oButton:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cOldLabel <span style="color: #000000;">&#41;</span>, oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">&#40;</span> oButton <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGet, cLabel := PadR<span style="color: #000000;">&#40;</span> oButton:<span style="color: #000000;">cToolTip</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span>, cOldToolTip := oButton:<span style="color: #000000;">cToolTip</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cLabel <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cLabel = PadR<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"tooltip"</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oButton:<span style="color: #000000;">cTooltip</span> := AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <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;">&#40;</span> oButton:<span style="color: #000000;">cToolTip</span> := AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;@ <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;">&#40;</span> oButton:<span style="color: #000000;">cToolTip</span> := cOldToolTip, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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;">&#40;</span> oButton, oPopup <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oTv, oGet, cLabel := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oGet:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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;">&#40;</span> <span style="color: #ff0000;">"New"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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;">&#40;</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"New"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <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;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #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;">&#40;</span> oPopup := oTv:<span style="color: #000000;">GenMenu</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oTv:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oPopup != <span style="color: #00C800;">nil</span>, oTv:<span style="color: #000000;">LoadFromMenu</span><span style="color: #000000;">&#40;</span> oPopup <span style="color: #000000;">&#41;</span>, oTv:<span style="color: #000000;">SetItems</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"one"</span>, <span style="color: #ff0000;">"two"</span>, <span style="color: #ff0000;">"three"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oPopup != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oButton:<span style="color: #000000;">nTypeButton</span> = TYPE_POPUP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oButton:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> oPopup &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> SelGroupColors<span style="color: #000000;">&#40;</span> oRBGroup <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> bChoose := <span style="color: #000000;">&#123;</span> | oG | ChangeGrad1<span style="color: #000000;">&#40;</span> oG, oRBGroup <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;ChooseGradient<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">aGradSel</span>, bChoose, , <span style="color: #000000;">&#123;</span> | oChoose | CancelGroupGrad<span style="color: #000000;">&#40;</span> oChoose, oRBGroup <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CancelGroupGrad<span style="color: #000000;">&#40;</span> oChoose, oRBGroup <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aGrad1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp, hBright<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;aGrad1 = oChoose:<span style="color: #000000;">aInit</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">aGradSel</span> = aGrad1<br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">hBrushSel</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushSel</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hBmp = GradientBmp<span style="color: #000000;">&#40;</span> oRBGroup, oRBGroup:<span style="color: #000000;">nWidth</span>, oRBGroup:<span style="color: #000000;">nHeight</span>, aGrad1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = &nbsp;CreatePatternBrush<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hBright &nbsp;= BrightImg<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, hBmp, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushSel</span> := CreatePatternBrush<span style="color: #000000;">&#40;</span> hBright <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBright<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <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;">&#40;</span> oGrad, oRBGroup <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aGrad1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmp, hBright<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;aGrad1 = oGrad:<span style="color: #000000;">aGradOut</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">aGradSel</span> = aGrad1<br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">hBrushUnSel</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">hBrushSel</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushSel</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hBmp = GradientBmp<span style="color: #000000;">&#40;</span> oRBGroup, oRBGroup:<span style="color: #000000;">nWidth</span>, oRBGroup:<span style="color: #000000;">nHeight</span>, aGrad1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushUnSel</span> = &nbsp;CreatePatternBrush<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hBright &nbsp;= BrightImg<span style="color: #000000;">&#40;</span> oRBGroup:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, hBmp, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">hBrushSel</span> := CreatePatternBrush<span style="color: #000000;">&#40;</span> hBright <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBright<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;oRBGroup:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRBGroup:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <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;">&#40;</span> FREOPEN_STDERR <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> freopen<span style="color: #000000;">&#40;</span> hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, stderr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span> &nbsp; &nbsp;<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;"> &nbsp; <br />&nbsp; &nbsp;...<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cToolTip</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cCode += <span style="color: #ff0000;">' TOOLTIP "'</span> + ::<span style="color: #000000;">cToolTip</span> + <span style="color: #ff0000;">'"'</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;cCode += CRLF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> cCode &nbsp; <br />&nbsp;</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&#58; Unresolved external '_HB_FUN_PAGEGETMARGINS' referenced from C&#58;\WORK\PRG\PROVARTF\OBJ\RICHPREV&#46;OBJ Error&#58; Unresolved external '_HB_FUN_PRNGETPAGENUMS' referenced from C&#58;\WORK\PRG\PROVARTF\OBJ\RICHPREV&#46;OBJ Error&#58; Unresolved external '_HB_FUN_PRNGETCOLLATE' referenced from C&#58;\WORK\PRG\PROVARTF\OBJ\RICHPREV&#46;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