topic
stringlengths
1
63
text
stringlengths
1
577k
BUG in Trbbtn
In ::New() of this class are the code [code=fw:3tb8tx41]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">l2013</span></div>[/code:3tb8tx41] When I use this button-class outside from ribbon e.g. in a Dialog this couldnt functioning as the data l2013 not present.
BUG in Trbbtn
In the trbtn.prg, the condition is like this: [code=fw:3kna8l6i]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TRIBBONBAR"</span> <span style="color: #000000;">&#41;</span> .or. ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TRBGROUP"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> .and. ;<br />      ! ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">l2013</span><br /> </div>[/code:3kna8l6i] The condition ! ::oWnd:l2013 is checked only if ::oWnd is RibbonBar or TRbGroup, [b:3kna8l6i]provided /z compiler flag is not used while compiling trbtn.prg.[/b:3kna8l6i] All FWH lib prgs are complied without /z flag because FWH sources use shortcutting. I hope you are not compiling this prg separately with /z flag and linking with your application.
BUG msgitem (Antonio)
Joaquín, Gracias! Por favor cambia asi el método MouseMove() de la Clase TMsgBar: [code=fw:1nog9w82]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> MouseMove<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TMsgBar<br /><br />   <span style="color: #00C800;">local</span> n, oItem<br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aItems</span> <span style="color: #000000;">&#41;</span><br />      oItem = ::<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">if</span> oItem:<span style="color: #000000;">IsOver</span><span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span> <br />         <span style="color: #00C800;">if</span> oItem:<span style="color: #000000;">bAction</span> != <span style="color: #00C800;">nil</span><br />            CursorHand<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span>   <br />         <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nItem</span> != n<br />            ::<span style="color: #000000;">nItem</span> := n<br />            ::<span style="color: #000000;">DestroyToolTip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />         ::<span style="color: #000000;">CheckToolTip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">next</span><br />   ::<span style="color: #000000;">DestroyToolTip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nItem</span> := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">MouseMove</span><span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span></div>[/code:1nog9w82]
BUG msgitem (Antonio)
Hola, En un mensaje anterior del que nadie comentó nada, dije que cuando asignaba un tooltip a un msgitem, ni salía el cursor dedo del ratón al ponerse encima ni mostraba el tooltip. Me he dado cuenta que es un bug en la clase msgitem. [b:10tyxx02]No funciona el tooltip, si no está definido una ACTION.[/b:10tyxx02] DEFINE MSGITEM oMsgTTS OF oMsgprin PROMPT "TTS" ; SIZE 40; COLOR If(ltts,CLR_WHITE,CLR_GRAY),If(ltts,CLR_GREEN,CLR_HGRAY); [b:10tyxx02]ACTION .T. ;[/b:10tyxx02] TOOLTIP If(ltts,"TTS activo","TTS desactivado") [b:10tyxx02]Esto SÍ funciona[/b:10tyxx02], sin el ACTION no funciona. Deduzco que el ACTION no está definido por defecto cuando existe un tooltip y no una acción.
BUG on GETS with password
In the new 19/12 are no input to make on a REDEFINE GET with clausula password in the RC-file. Also the Picture-clausula are not respected! With DEFINE GET... i do not know!
BUG on GETS with password
[code=fw:rouqxcej]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oBtn<br /><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;">"Test PassWord"</span><br /><br />&nbsp; &nbsp;@<span style="color: #000000;">1.5</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Test GET and PASSWORD"</span> &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> TESTPASSW<span style="color: #000000;">&#40;</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 /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TESTPASSW<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oGet1, oGet2, oGet3<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cUserName := <span style="color: #ff0000;">"Byte-One "</span> + SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">32</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cPassword := SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">40</span> <span style="color: #000000;">&#41;</span>, cPassword2 := SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">40</span> <span style="color: #000000;">&#41;</span><br /><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;">"Test Password in FiveWin"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> &nbsp; <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cUserName &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">12</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> &nbsp; <span style="color: #0000ff;">GET</span> oGet2 <span style="color: #0000ff;">VAR</span> cPassword &nbsp;PASSWORD <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">3.5</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet3 <span style="color: #0000ff;">VAR</span> cPassword2 PASSWORD <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">OF</span> oDlg<br /><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;">/*<br />&nbsp;Using Resources:<br /><br />&nbsp;EDITTEXT 20, 101, 63, 50, 14, ES_CENTER | ES_MULTILINE | ES_PASSWORD | WS_BORDER | WS_GROUP | WS_TABSTOP<br />*/</span><br />&nbsp;</div>[/code:rouqxcej] Regards.
BUG on GETS with password
Thanks i will try. For now i have removed in the RC clausula "password", in my program i set oGet:lPassword to .T.. Now is functioning.
BUG on GETS with password
Have a small example for testing with REDEFINE GET? Make a DEMO and post for download please. Regards.
BUG on GETS with password
Further tests show, that a REDEFINE GET with password will not functioning, if a ON CHANGE clausula is using (the length of the get-variable will be shorter and shorter and overwrite the text is impossible). Also a PICTURE-clausula is not respected!
BUG on GETS with password
Hello karinha, now i found the reason for this problem. In my routine to sign in a have a timer, which go to standard-user after 10 secs. On the password get i have a clausula ON CHANGE: [code=fw:1jj5d9fw]<div class="fw" id="{CB}" style="font-family: monospace;">oTimer:<span style="color: #000000;">deactivate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1jj5d9fw] Now if i press letter for letter this is always executed and i cannot input further. Now i use: [code=fw:1jj5d9fw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>oTimer:<span style="color: #000000;">lactive</span>,oTimer:<span style="color: #000000;">deactivate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span></div>[/code:1jj5d9fw] and then it was functioning. But I use this for years. From 1912 on, this is so. But the picture-clause from a passwort-get is not respected on input and also overwrite is not functioning (also mark all and press any letter the old input is not erased)!!
BUG on GETS with password
I didn't understand the need to use a Timer () when asking for a simple password. Senha = Password. <!-- m --><a class="postlink" href="https://i.imgur.com/49gl4LC.png">https://i.imgur.com/49gl4LC.png</a><!-- m --> [img:3k27i9n2]https&#58;//i&#46;imgur&#46;com/49gl4LC&#46;png[/img:3k27i9n2] Regards, saludos.
BUG on GETS with password
Karinha, the software is also using in a automode if after start nobody types in a password. After 10 secs the password-dialog ends and a predefined password is using. If inside the 10 secs a user types in a char, the timer stops and the user must type in the password. This problem is solved. [color=#FF0000:3nc6cqgt]NOT SOLVED!! The picture-clause (in my case "@!") from a passwort-get is not respected on input and also overwrite is not functioning (also mark all and press any letter the old input is not erased)!![/color:3nc6cqgt]
BUG on GETS with password
Mister Günther, in this case, it is better that you speak directly with Master Cristóbal. Please send an email to Master Cristóbal. He is the ideal person to verify this fact. Sorry I can't help anymore. Regards.
BUG on GETS with password
[quote="byte-one":1gogo2kr]Karinha, the software is also using in a automode if after start nobody types in a password. After 10 secs the password-dialog ends and a predefined password is using. If inside the 10 secs a user types in a char, the timer stops and the user must type in the password. This problem is solved. [color=#FF0000:1gogo2kr]NOT SOLVED!! The picture-clause (in my case "@!") from a passwort-get is not respected on input and also overwrite is not functioning (also mark all and press any letter the old input is not erased)!![/color:1gogo2kr][/quote:1gogo2kr] I am looking into this.
BUG on GETS with password
We are looking into the points raised by you one by one. [quote:3r1zei11] In the new 19/12 are no input to make on a REDEFINE GET with clausula password in the RC-file [/quote:3r1zei11] The command REDEFINE GET never had the clause "PASSWORD" in any of the previous versions also. FWH1912 is not different from previous versions. The only way to redefine a Password Get is to set ES_PASSWORD flag of the control in the rc file. Example: [code=fw:3r1zei11]<div class="fw" id="{CB}" style="font-family: monospace;"><br />EDITTEXT <span style="color: #000000;">102</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">71</span>, <span style="color: #000000;">131</span>, <span style="color: #000000;">12</span>, ES_PASSWORD | WS_BORDER | WS_TABSTOP<br />&nbsp;</div>[/code:3r1zei11] This is the only way. [quote:3r1zei11] Also the Picture-clausula are not respected [/quote:3r1zei11] You are right. Clause PICTURE '@!" is not respected in REDEFINE'd password Get in version 1912 only. Fixed now. Now, we can use the flag ES_UPPERCASE to force input of capital letters [code=fw:3r1zei11]<div class="fw" id="{CB}" style="font-family: monospace;"><br />EDITTEXT <span style="color: #000000;">102</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">71</span>, <span style="color: #000000;">131</span>, <span style="color: #000000;">12</span>, ES_PASSWORD | WS_BORDER | WS_TABSTOP | ES_UPPERCASE<br />&nbsp;</div>[/code:3r1zei11] However in case if Gets defined from source code, we can use PASSWORD clause and the picture "@!" also works. We will deal with other issues in the next posts.
BUG on GETS with password
All the other issues raised are addressed in the next version under release.
BUG xBrowse - Antonio olhe isso por favor !
Antonio, Utilizando o código abaixo: uBrw := TXBrowse():New( oDlp ) bStruc :={{"","Sim",0,CTOD(""),CTOD(""),0}} uBrw:SetArray( bStruc ) uBrw:aCols[1]:cHeader := "Parcela" ubrw:aCols[1]:nWidth := 50 uBrw:aCols[1]:cEditPicture := "999" uBrw:aCols[1]:bClrEdit := uBrw:bClrStd uBrw:aCols[1]:bOnPostEdit := {|o,x| bStruc[ uBrw:nArrayAt, 1 ] := x } uBrw:aCols[2]:cHeader := "Recebida" ubrw:aCols[2]:nWidth := 60 uBrw:aCols[2]:nDataStrAlign := AL_LEFT uBrw:aCols[2]:nHeadStrAlign := AL_LEFT uBrw:aCols[2]:nEditType := EDIT_LISTBOX uBrw:aCols[2]:aEditListTxt := {"Sim", "Não"} uBrw:aCols[2]:bOnPostEdit := {|o,x| bStruc[ uBrw:nArrayAt, 2 ] := x } uBrw:aCols[2]:aEditListBound := {"Sim", "Não"} uBrw:aCols[2]:bClrEdit := uBrw:bClrStd uBrw:aCols[3]:cHeader := "Valor" ubrw:aCols[3]:nWidth := 70 uBrw:aCols[3]:cEditPicture := "@E 999,999.99" uBrw:aCols[3]:nDataStrAlign := AL_RIGHT uBrw:aCols[3]:nHeadStrAlign := AL_RIGHT uBrw:aCols[3]:bOnPostEdit := {|o,x| bStruc[uBrw:nArrayAt, 3 ] := x } uBrw:aCols[3]:nEditType := EDIT_GET uBrw:aCols[3]:bStrData := {|| TRANS(bStruc[uBrw:nArrayAt, 3 ] ,"@E 999,999.99")} uBrw:aCols[4]:cHeader := padc("Vencimento",11) ubrw:aCols[4]:nWidth := 80 uBrw:aCols[4]:nDataStrAlign := AL_CENTER uBrw:aCols[4]:nHeadStrAlign := AL_CENTER uBrw:aCols[4]:bOnPostEdit := {|o,x| bStruc[ uBrw:nArrayAt, 4 ] := x } uBrw:aCols[4]:nEditType := EDIT_GET uBrw:aCols[5]:cHeader := padc("Data Pgto",11) ubrw:aCols[5]:nWidth := 80 uBrw:aCols[5]:nDataStrAlign := AL_CENTER uBrw:aCols[5]:nHeadStrAlign := AL_CENTER uBrw:aCols[5]:bOnPostEdit := {|o,x| bStruc[ uBrw:nArrayAt, 5 ] := x } uBrw:aCols[5]:nEditType := EDIT_GET uBrw:aCols[6]:cHeader := "Valor Pgto" ubrw:aCols[6]:nWidth := 70 uBrw:aCols[6]:cEditPicture := "@E 999,999.99" uBrw:aCols[6]:nDataStrAlign := AL_RIGHT uBrw:aCols[6]:nHeadStrAlign := AL_RIGHT uBrw:aCols[6]:bOnPostEdit := {|o,x| bStruc[ uBrw:nArrayAt, 6 ] := x} uBrw:aCols[6]:nEditType := EDIT_GET uBrw:aCols[6]:bStrData := {|| TRANS(bStruc[uBrw:nArrayAt, 6 ],"@E 999,999.99")} uBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL uBrw:nColDividerStyle := LINESTYLE_DARKGRAY uBrw:lColDividerComplete := .t. uBrw:nFooterLines := 2 uBrw:lFooter := .t. uBrw:aCols[ 1 ]:cFooter := "Total:" uBrw:bClrStd := { ||{ RGB(0,0,0), iif( uBrw:nArrayAt % 2 == 0, RGB(234,255,234) , RGB(255,255,255) ) } } uBrw:nFreeze := 6 uBrw:lHScroll := .f. uBrw:lVScroll := .f. uBrw:lFastEdit := .T. //ENTER cod barras uBrw:CreateFromResource( 101 ) *********************************************************** STATIC FUNCTION CRIA_TITULOS(cocond,iniciemis,tivalor,uBrw) *********************************************************** LOCAL X,vvaltotal:=0,calcv:=0,ultparc select condicoes dbsetorder(1) if dbseek(cocond) bStruc:={} calcv :=round(tivalor/condicoes->co_parc,2) Select TabCondicoes dbsetorder(1) dbseek(str(cocond,4,0)) do while TabCondicoes->pg_codi==cocond .and. TabCondicoes->(! eof()) iniciemis+=TabCondicoes->pg_praz AADD(bStruc,{TabCondicoes->pg_nupa,"Sim",calcv,iniciemis,ctod(""),0}) TabCondicoes->(dbskip()) enddo IF LEN(bStruc)>0 vvaltotal:=0 ultparc :=len(bStruc) FOR X:=1 TO (LEN(bStruc)-1) vvaltotal+=round(bStruc[x][3],2) NEXT bStruc[ultparc][3]:=round(tivalor-vvaltotal,2) else bStruc :={{"","Sim",0,CTOD(""),CTOD(""),0}} ENDIF uBrw:aArrayData := aClone( bStruc ) uBrw:refresh() endif RETURN(.T.) Esta acontecendo o seguinte, vamos supor que o meu array tenha uns 100 registros, e, eu queira corre-los para baixo. aperto a seta para baixo e os registros começam a correr, porém, os dados de todas colunas(menos a ultima) assumem valores estranhos ex: <!-- m --><a class="postlink" href="http://img255.imageshack.us/img255/1310/seta1cb3.jpg">http://img255.imageshack.us/img255/1310/seta1cb3.jpg</a><!-- m --> E se a seta for para cima, ai o BUG é ao contrário, ou seja, todas as linhas ficam certas menos a ultima. ex: <!-- m --><a class="postlink" href="http://img150.imageshack.us/img150/7351/seta2fz5.jpg">http://img150.imageshack.us/img150/7351/seta2fz5.jpg</a><!-- m --> using fwh 7.01 AOKISANTOS <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
BUG xBrowse - Antonio olhe isso por favor !
Hola AOKISANTOS: El problema que planteas me tiene desconcertado, no por que se produzca, ya que es un error que conocía, sino porque tal como defines xBrouse en un recurso y sin borde, no debería producirse, salvo que hayas alterado el código original del xbrouse.prg. (y creo que sí) En principio este problema se produce por un mal cálculo del la altura del xbrouse cuando esta definido el control con borde (WS_BORDER), por recursos, (.RC) y se utiliza con Footer, en estos casos hay una discordancia entre el pintado (::Paint()) y el scroll de la función XBrwScroll() que es el bug que tú indicas y además pinta mal el Footer (que como veras en los JPGs que adjuntas , esta cortado, le falta las últimas líneas de pixels) Temporalmente la solución, y estoy trabajando en corregir este problema y otros, es cambiar en el código de xBrowse.prg para que METHOD BrwHeight() devuelva 2 ó 4 pixels menos, algo así como: METHOD BrwHeight() INLINE ( ::nHeight - 2 - iif( ::lHScroll, GetSysMetrics( SM_CYHSCROLL ), 0 ) ) ó METHOD BrwHeight() INLINE ( ::nHeight - 4 - iif( ::lHScroll, GetSysMetrics( SM_CYHSCROLL ), 0 ) ) Y también hay un bug en el METHOD GoUp() que te puede afectar cuando la altura de la cabecera y la de las líneas de datos son diferentes, donde pone: ::EraseData( ( Int(nHeight/::nRowHeight) + 1 )* ::nRowHeight ) Debería poner: ::EraseData( Int(nHeight/::nRowHeight) * ::nRowHeight + ::HeaderHeight() ) Un saludo, Ramón Avendaño.
BUG xBrowse savestate restorestate
Tengo el siguiente problema: [code:3i6ql3m3] #include "fivewin&#46;ch" #include "xbrowse&#46;ch" function Main2&#40;&#41; local oDlg, oBrw, cSaveState, cPath &#58;= "c&#58;\" cSaveState &#58;= GETPVPROFSTRING&#40; "BrowseArray", "SaveState", "", cPath + "prueba&#46;ini" &#41; msginfo&#40; cSaveState &#41; DEFINE DIALOG oDlg SIZE 600, 200 @ 0, 0 XBROWSE oBrw OF oDlg ARRAY &#123; &#123; "uno","dos","tres", "cuatro", "cinco", "seis", "siete", "ocho", "nueve", "diez" &#125; &#125; AUTOCOLS oBrw&#58;CreateFromCode&#40;&#41; oBrw&#58;bKeyDown = &#123; || oDlg&#58;SetText&#40; Str&#40; oBrw&#58;nColSel &#41; &#41; &#125; ACTIVATE DIALOG oDlg CENTER ON INIT &#40; IIF&#40; !EMPTY&#40; cSaveState &#41;, oBrw&#58;RestoreState&#40; cSaveState &#41;, "" &#41;, oDlg&#58;oClient &#58;= oBrw, oDlg&#58;Resize&#40;&#41; &#41;; VALID &#40; cSaveState &#58;= oBrw&#58;savestate&#40;&#41;, msginfo&#40; cSaveState&#41;, WritePProString&#40; "BrowseArray", "SaveState", cSaveState, cPath + "prueba&#46;ini" &#41;, &#46;t&#46; &#41; return nil [/code:3i6ql3m3]Si pongo la columna numero diez entre la 6 y la 7, al hacer el restorestate me cambia el orden de las columnas 7, 8 y 9, alguna idea?gracias
BUG xBrowse savestate restorestate
Antonio, Es un problema que da fastidio a mis clientes, ya que todo mi programa ahora usa xbrowse, y salva/recupera las posiciones de cada columna.Se logra entender cual es el problema o pongo imagenes?gracias
BUG xBrowse savestate restorestate
siempre una imagen habla mas que mil palabras... <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
BUG xBrowse savestate restorestate
Abro la ventana con el browse:[url=http&#58;//img261&#46;imageshack&#46;us/my&#46;php?image=img1kl2&#46;jpg:29mg1bot][img:29mg1bot]http&#58;//img261&#46;imageshack&#46;us/img261/6537/img1kl2&#46;th&#46;jpg[/img:29mg1bot][/url:29mg1bot]Cambio la columna 10 y la meto entra la 6 y la 7:[url=http&#58;//img266&#46;imageshack&#46;us/my&#46;php?image=img2pc7&#46;jpg:29mg1bot][img:29mg1bot]http&#58;//img266&#46;imageshack&#46;us/img266/9199/img2pc7&#46;th&#46;jpg[/img:29mg1bot][/url:29mg1bot]Cierro el browse, salvo en el archivo .ini y luego re-abro el browse:[url=http&#58;//img266&#46;imageshack&#46;us/my&#46;php?image=img3px4&#46;jpg:29mg1bot][img:29mg1bot]http&#58;//img266&#46;imageshack&#46;us/img266/1594/img3px4&#46;th&#46;jpg[/img:29mg1bot][/url:29mg1bot]El orden deberia ser: 1,2,3,4,5,6,10,7,8,9En vez, el orden es: 1,2,3,4,5,6,10,9,8,7Ahora deberia ser mas claro.Saludos
BUG xBrowse savestate restorestate
cambia el metodo RestoreState( cState )por este... espero se solucione tu problema[code:2y6tujy7] METHOD RestoreState&#40; cState &#41; CLASS TXBrowse local oCol local aMoved, aNaturalOrder local cCol local nLen, nOrder, nWidth, nFor, nAt, nHeight local lHide,cHeader,j if Empty&#40; cState &#41; return nil endif aMoved &#58;= &#123;&#125; aNaturalOrder &#58;= &#123;&#125; nLen &#58;= Len&#40; &#58;&#58;aCols &#41; nHeight &#58;= Val&#40;StrToken&#40; cState, 1, ";" &#41; &#41; if Empty&#40; &#58;&#58;nRowHeight &#41; return nil endif // Check integrity for nFor &#58;= 1 to nLen cCol &#58;= StrToken&#40; cState, nFor + 1, ";" &#41; if Empty&#40; cCol &#41; return nil endif aadd&#40; aNaturalOrder, nFor &#41; next &#58;&#58;nRowHeight &#58;= nHeight for nFor &#58;= 1 to nLen cCol &#58;= StrToken&#40; cState, nFor + 1, ";" &#41; nOrder &#58;= Val&#40; StrToken&#40; cCol, 1, "&#58;" &#41; &#41; nWidth &#58;= Val&#40; StrToken&#40; cCol, 2, "&#58;" &#41; &#41; cHeader &#58;= StrToken&#40; cCol, 3, "&#58;" &#41; lHide &#58;= &#40; AllTrim&#40; StrToken&#40; cCol, 4, "&#58;" &#41; &#41; == "H" &#41; nAt &#58;= Ascan&#40; &#58;&#58;aCols, &#123;|v| v&#58;nCreationOrder == nOrder &#125; &#41; if nAt > 0 oCol &#58;= &#58;&#58;aCols&#91; nAt &#93; oCol&#58;lHide &#58;= lHide oCol&#58;nWidth &#58;= nWidth oCol&#58;cHeader &#58;= cHeader endif if nOrder != nFor if nOrder != aNaturalOrder&#91; nFor &#93; &#46;and&#46; &#40; nAt &#58;= Ascan&#40; aNaturalOrder, nOrder &#41; &#41; != 0 &#58;&#58;SwapCols&#40; nFor, nAt, &#46;f&#46; &#41; aNaturalOrder&#91; nFor &#93;&#58;= nOrder aNaturalOrder&#91; nAt &#93;&#58;= nFor endif endif next &#58;&#58;GetDisplayCols&#40;&#41; &#58;&#58;Super&#58;Refresh&#40;&#41; return nil [/code:2y6tujy7]
BUG xBrowse savestate restorestate
Daniel,muchas gracias, lo acabo de probar y funciona <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Ahora voy a fijarme cuales son las modificaciones que tu hiciste, serían de proponer a Antonio, porque es un bug en la clase original.Saludos y nuevamente gracias
BUG xBrowse savestate restorestate
Daniel, visto el código escrito me quedó clarísimo.ahora lo pruebo mas a fondo, pero te diría que quedó perfecto.saludos
BUG xBrowse savestate restorestate
siempre a la orden cualquier cosa mi messenger es <!-- e --><a href="mailto:danielgarciagil@cantv.net">danielgarciagil@cantv.net</a><!-- e -->
BUG 1º Get + Valid do Folder...
Ao Sair de um Get da Dialog e Caindo no Folder, se o 1º Get do Folder estiver com um valid ele eh acionado Automaticamente, veja: TestFold.prg [code=fw:2f6xqx53]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Folder.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> oDlg, oFld, oGet, oGetFld1, cGetFld2<br />   <span style="color: #00C800;">local</span> cGet1 := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span>, nGetF1 := <span style="color: #000000;">0</span>, cGetF2 := space<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span><br /><br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cGet1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">21</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span>  <span style="color: #0000ff;">UPDATE</span>  <span style="color: #B900B9;">//valid !Empty(cGet1)</span><br /><br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />              <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Test"</span> ;<br />              <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"Sub1"</span> ;<br />              <span style="color: #0000ff;">UPDATE</span><br /><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGetFld1 <span style="color: #0000ff;">VAR</span> nGetF1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">21</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999"</span> <span style="color: #0000ff;">valid</span> ValidGet<span style="color: #000000;">&#40;</span> nGetF1 <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGetFld2 <span style="color: #0000ff;">VAR</span> cGetF2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">22</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@"</span> <br />     <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />    <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />********************************************************************************<br /><span style="color: #00C800;">function</span> ValidGet<span style="color: #000000;">&#40;</span> _nGetF1 <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">if</span> _nGetF1 == <span style="color: #000000;">0</span><br />       <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Valid Folder Get1 Erro"</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">return</span> .f.<br />    <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> .t.<br /> </div>[/code:2f6xqx53] TestFold.Rc [code=fw:2f6xqx53]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><span style="color: #00D7D7;">#include</span> <richedit.h><br /><br />LANGUAGE LANG_PORTUGUESE,SUBLANG_PORTUGUESE_BRAZILIAN<br /><br />TEST <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">19</span>, <span style="color: #000000;">47</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">157</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"FiveWin Folders Demo"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Get1"</span>, <span style="color: #000000;">4001</span>, <span style="color: #ff0000;">"Static"</span>, SS_CENTERIMAGE|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">12</span>, WS_EX_STATICEDGE<br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">21</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_TABSTOP, <span style="color: #000000;">44</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">176</span>, <span style="color: #000000;">12</span>, WS_EX_STATICEDGE<br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">110</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, WS_TABSTOP, <span style="color: #000000;">4</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">225</span>, <span style="color: #000000;">99</span><br /><span style="color: #000000;">&#125;</span><br /><br />SUB1 <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">18</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">205</span>, <span style="color: #000000;">80</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD|DS_3DLOOK<br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Valid"</span>, <span style="color: #000000;">4001</span>, <span style="color: #ff0000;">"Static"</span>, SS_CENTERIMAGE|WS_GROUP, <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">12</span>, WS_EX_STATICEDGE<br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">21</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_TABSTOP, <span style="color: #000000;">40</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">136</span>, <span style="color: #000000;">12</span>, WS_EX_STATICEDGE<br />&nbsp; CONTROL <span style="color: #ff0000;">"Get"</span>, <span style="color: #000000;">4003</span>, <span style="color: #ff0000;">"Static"</span>, SS_CENTERIMAGE|WS_GROUP, <span style="color: #000000;">4</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">12</span>, WS_EX_STATICEDGE<br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">22</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_TABSTOP, <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">136</span>, <span style="color: #000000;">12</span>, WS_EX_STATICEDGE<br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:2f6xqx53] Notei que o problema pode estar aqui : [code=fw:2f6xqx53]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GotFocus<span style="color: #000000;">&#40;</span> hWndLoseFocus <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TFolder<br /><br />   <span style="color: #00C800;">Super</span>:<span style="color: #000000;">GotFocus</span><span style="color: #000000;">&#40;</span> hWndLoseFocus <span style="color: #000000;">&#41;</span><br />    <br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nOption</span> > <span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">nOption</span> <= Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> ::<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AEvalWhen</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> ::<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span>:<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: #00C800;">return</span> <span style="color: #000000;">0</span><br /> </div>[/code:2f6xqx53] Se eu Colocar um MsgInfo, o problema se resolve : [code=fw:2f6xqx53]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GotFocus<span style="color: #000000;">&#40;</span> hWndLoseFocus <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TFolder<br /><br />   <span style="color: #00C800;">Super</span>:<span style="color: #000000;">GotFocus</span><span style="color: #000000;">&#40;</span> hWndLoseFocus <span style="color: #000000;">&#41;</span><br />    <br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nOption</span> > <span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">nOption</span> <= Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> ::<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AEvalWhen</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> ::<span style="color: #000000;">nOption</span> <span style="color: #000000;">&#93;</span>:<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: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Pause"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /> </div>[/code:2f6xqx53] Qual seria a soluçao Correta ? Saluds, Ale
BUG 1º Get + Valid do Folder...
Coloquei Sim Joao. Neste exemplo Observe q nem Botao tem. Saluds, Ale
BUG 1º Get + Valid do Folder...
sin embargo, no hay solución? Saluds, Ale
BUG 1º Get + Valid do Folder...
Você colocou o CANCEL UPDATE no Botão de Saida?? Experimente colocar CANCEL UPDATE em todos os botões do DIALOGO do Folder para ver. Abs,
BUG: COMBOBOX with style CBS_DROPDOWN
Here is a little test-program to show the Situation. [code=fw:olp3k6vu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oDlg , oCombo1<br /><br />dbcreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"feld1"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />USE<br />USE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"testdb"</span> <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb->feld1 := <span style="color: #ff0000;">"ABCDEFGHIJ"</span><br />testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb->feld1 := replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb-><span style="color: #000000;">&#40;</span>dbgotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Combobox CBS_DROPDOWN Test"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo1 <span style="color: #0000ff;">VAR</span> testdb->feld1 <span style="color: #0000ff;">PROMPTS</span> <span style="color: #000000;">&#123;</span>replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN <span style="color: #0000ff;">UPDATE</span><br /><br />@ <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"<"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Begin of DB"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />@ <span style="color: #000000;">4</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">">"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><<span style="color: #000000;">2</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"End of DB"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">6</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"1. Go with > to the second record."</span>+CRLF+<span style="color: #ff0000;">"2. Go with < return to the first record"</span>+CRLF+<span style="color: #ff0000;">"3. Open the Combobox with the arrow"</span>+CRLF+CRLF+;<br />    <span style="color: #ff0000;">"Now you see, that the first record also is 'BBBBBBBBBB'"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">50</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:olp3k6vu]
BUG: COMBOBOX with style CBS_DROPDOWN
If using such Combobox and skip on a database, a userdefined field-text from a record are changed to the last selected text from the combobox in another record if the Combobox becomes Focus or clicking on the arrow. Also the colors from SetGetColorFocus() not using.
BUG: COMBOBOX with style CBS_DROPDOWN
Gunther Hope this thread helps some .. <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=24915&p=135522&hilit=combobox#p135522">viewtopic.php?f=3&t=24915&p=135522&hilit=combobox#p135522</a><!-- l --> As far as the appearance .. the answer is in the thread above. [code=fw:1y6mn0ae]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br /> </div>[/code:1y6mn0ae] Rick Lipkin
BUG: COMBOBOX with style CBS_DROPDOWN
Thanks Rick, but not the font becomes different, just the free text (as CBS-DROPDOWN made possible to write free text) in [b:3a5xpw9k]this record[/b:3a5xpw9k] becomes (if i open the Combobox) the same value, in [b:3a5xpw9k]another record[/b:3a5xpw9k] was selected from the combobox-list and the free-text is erased.
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, this is very important to me. But i found no solution for this. [b:qjle2aze]Antonio, i had sent to you a privat E-Mail for updating my FWH but no answer!?[/b:qjle2aze]
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, I have just seen your example and I am going to test it. I have not received any emails from you, unless gmail move it to the spam folder... (edited: nothing in the spam folder also) Please resend it, thanks
BUG: COMBOBOX with style CBS_DROPDOWN
Thanks! Antonio, i have sent it to <!-- e --><a href="mailto:alinares@fivetechsoft.com">alinares@fivetechsoft.com</a><!-- e -->! I resend it.
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, Please resend me your email, as I have not received it. Your example fails because the first value you place in the field does not match any of the values in the combobox. Please try your example with some little modifications from me and you will see that it works fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:373stjo5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg , oCombo1<br /><br />&nbsp; &nbsp;dbcreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"feld1"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;USE<br />&nbsp; &nbsp;USE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"testdb"</span> <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb->feld1 := replicate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A"</span>, len<span style="color: #000000;">&#40;</span> testdb->feld1 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// "ABCDEFGHIJ"</span><br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb->feld1 := replicate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"B"</span>, len<span style="color: #000000;">&#40;</span> testdb->feld1 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbgotop<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: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Combobox CBS_DROPDOWN Test"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo1 <span style="color: #0000ff;">VAR</span> testdb->feld1 ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPTS</span> <span style="color: #000000;">&#123;</span>replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"<"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Begin of DB"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">">"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><<span style="color: #000000;">2</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"End of DB"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">6</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"1. Go with > to the second record."</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"2. Go with < return to the first record"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"3. Open the Combobox with the arrow"</span> + CRLF + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Now you see, that the first record also is 'BBBBBBBBBB'"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">50</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 /><br />&nbsp; &nbsp;USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:373stjo5]
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, Still haven't received your email. Please resend it to <!-- e --><a href="mailto:antonio.fivetech@gmail.com">antonio.fivetech@gmail.com</a><!-- e --> thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, i think, style CBS_DROPDOWN lets me also another text to input (as it have a oGet-object), not only text from the list?
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, Yes, good observation <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> With this little change in combobox.prg, your original example works fine: METHOD Set( cNewItem ) CLASS TComboBox ... if ValType( cNewItem ) == "N" .or. nAt != 0 .and. ::oGet == nil ... Included for next FWH build
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, this solution is unperfected. Please test this new code with more the 2 records. This shows the problem more exact. And please show that SetGetColorFocus() not functioning on this ::oGet. [code=fw:1osa8ft0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oDlg , oCombo1<br /><br />dbcreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"feld1"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />USE<br />USE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"testdb"</span> <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb->feld1 := replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb->feld1 := <span style="color: #ff0000;">"ABCDEFGHIJ"</span><br />testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb->feld1 := replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />testdb-><span style="color: #000000;">&#40;</span>dbgotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Combobox CBS_DROPDOWN Test"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">350</span> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Recno: "</span>+alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br /><br />@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo1 <span style="color: #0000ff;">VAR</span> testdb->feld1 <span style="color: #0000ff;">PROMPTS</span> <span style="color: #000000;">&#123;</span>replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN <span style="color: #0000ff;">UPDATE</span><br /><br />@ <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"<"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Begin of DB"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />@ <span style="color: #000000;">4</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">">"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><<span style="color: #000000;">3</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"End of DB"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">6</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"1. Go with > to the second record."</span>+CRLF+<span style="color: #ff0000;">"2. Go with > to the third record"</span>+CRLF+<span style="color: #ff0000;">"3. Go with < return to the second record"</span>+CRLF+<span style="color: #ff0000;">"4. Open the Combobox with the arrow"</span>+CRLF+CRLF+;<br />    <span style="color: #ff0000;">"Now you see, that the second record also is 'AAAAAAAAAA'"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">50</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1osa8ft0]
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, Please try this change: [code=fw:38q0mh9c]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> LostFocus<span style="color: #000000;">&#40;</span> hWndGetFocus <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TComboBox<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt := ::<span style="color: #000000;">SendMsg</span><span style="color: #000000;">&#40;</span> CB_GETCURSEL <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">LostFocus</span><span style="color: #000000;">&#40;</span> hWndGetFocus <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nAt != CB_ERR<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nAt</span> = nAt + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, nAt + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span> == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">oGet</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> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, GetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:38q0mh9c]
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, now all is OK!!! Thanks. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Only a second place in Combobox.prg is also to update: [code=fw:j1jy8zha]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> VarGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TComboBox<br /><br />   <span style="color: #00C800;">local</span> cRet, nAt := ::<span style="color: #000000;">SendMsg</span><span style="color: #000000;">&#40;</span> CB_GETCURSEL <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> nAt != CB_ERR<br />      ::<span style="color: #000000;">nAt</span> = nAt + <span style="color: #000000;">1</span><br />      <span style="color: #B900B9;">//cRet :=  ::aItems[ nAt + 1 ]</span><br />      cRet := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span> == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">oGet</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></div>[/code:j1jy8zha]
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, Already included for the next FWH build, many thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Great feedback from you, thanks
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, all FW-users profit from the team! And at least: Please show that SetGetColorFocus() not functioning on this ::oGet.
BUG: COMBOBOX with style CBS_DROPDOWN
Hi Antonio, there are still problem with dropdown combobox. When the dropdown combo hasn't the focus the values displayed is incorrect. See image 1 Only if I press the mouse button on the combo the right value appears. See image 2 Any ideas ? Image 1 [img:16hhb540]http&#58;//www&#46;softwarexp&#46;co&#46;uk/beta/image1&#46;png[/img:16hhb540] Image 2 [img:16hhb540]http&#58;//www&#46;softwarexp&#46;co&#46;uk/beta/image2&#46;png[/img:16hhb540]
BUG: COMBOBOX with style CBS_DROPDOWN
Marco, has the Combobox clausula "UPDATE" ?
BUG: COMBOBOX with style CBS_DROPDOWN
Yes of course
BUG: COMBOBOX with style CBS_DROPDOWN
Can see no problems...!!??
BUG: COMBOBOX with style CBS_DROPDOWN
Marco, have you applied the combobox fixes that I have published on this thread ? thanks
BUG: COMBOBOX with style CBS_DROPDOWN
Colin, Marco, I modified Colin's code this way: [code=fw:2o5w4rma]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> Set<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TComboBox<br /><br />   <span style="color: #00C800;">local</span> nAt<br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span><br />      nAt = cNewItem<br />      <span style="color: #00C800;">if</span> nAt == <span style="color: #000000;">0</span><br />         nAt = <span style="color: #000000;">1</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">else</span><br />      nAt = AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aItems</span>,;<br />                   <span style="color: #000000;">&#123;</span> | cItem | Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == ;<br />                               Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span> .or. nAt != <span style="color: #000000;">0</span> .and. ::<span style="color: #000000;">oGet</span> == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> nAt <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cNewItem := cValToChar<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, cNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> , cNewItem <span style="color: #000000;">&#41;</span><br />   <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2o5w4rma] Included for the next FWH build, thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUG: COMBOBOX with style CBS_DROPDOWN
Hi Colin, solved with your code. Thank you very much. Antonio, could you pls.add the Colin's fix to the next FWH release ? Thank you.
BUG: COMBOBOX with style CBS_DROPDOWN
Yes, I'll try to prepare a self-contained sample to show you the problem asap. Thanks
BUG: COMBOBOX with style CBS_DROPDOWN
Hi Marco I had the same problem with comboboxes - not showing the correct value [code=fw:3sem908j]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> Set<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TComboBox<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span><br />&nbsp; &nbsp; &nbsp; nAt = cNewItem<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nAt == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAt = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; nAt = AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aItems</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | cItem | Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span> .or. nAt != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> nAt <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, cNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> , cNewItem <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// added this line </span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cNewItem := cValToChar<span style="color: #000000;">&#40;</span> cNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, cNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> , cNewItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:3sem908j] Hope this helps Cheers Colin
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, with the last changes "COMBOBOX from code" is now ok but on "REDEFINE COMBOBOX" the ::oGet is created in all cases (tested with a characterlist) also on pure CBS_DROPDOWNLIST. I found the [code=fw:33u2wnnn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> lAnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nStyle</span>, CBS_DROPDOWN <span style="color: #000000;">&#41;</span></div>[/code:33u2wnnn] is not correct!? lAnd(2,3) == .T. lAnd(3,2) == .T. [b:33u2wnnn]What function can i use to gain the information from the RC-file that a Combobox is style CBS_DROPDOWN or CBS_DROPDOWNLIST ???[/b:33u2wnnn] I have tested [code=fw:33u2wnnn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> !lAnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nStyle</span>, CBS_DROPDOWNLIST <span style="color: #000000;">&#41;</span></div>[/code:33u2wnnn] and it seems functioning. But sideeffects must check Antonio. This block of code in ::new is to transfer in ::init (parts are already in ::init) [code=fw:33u2wnnn]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oGet</span> != <span style="color: #00C800;">nil</span><br />      ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">hWnd</span> = GetWindow<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GW_CHILD <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Link</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bLostFocus</span> = ;<br />      <span style="color: #000000;">&#123;</span>| hCtlFocus, nAt, cItem| cItem := GetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ;<br />      nAt := ::<span style="color: #000000;">SendMsg</span><span style="color: #000000;">&#40;</span> CB_FINDSTRING, <span style="color: #000000;">0</span>, Trim<span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span>,;<br />      Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span>, cItem <span style="color: #000000;">&#41;</span>,;<br />      ::<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> nAt <span style="color: #000000;">&#41;</span>,;<br />      SetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, cItem <span style="color: #000000;">&#41;</span>,;<br />      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bValid</span> != <span style="color: #00C800;">nil</span> .and. ;<br />      GetParent<span style="color: #000000;">&#40;</span> hCtlFocus <span style="color: #000000;">&#41;</span> == GetParent<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>,;<br />      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bValid</span>, ::<span style="color: #000000;">oGet</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span>,;<br />      ::<span style="color: #000000;">PostMsg</span><span style="color: #000000;">&#40;</span> WM_SETFOCUS <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> nKey == VK_TAB .and. ! GetKeyState<span style="color: #000000;">&#40;</span> VK_SHIFT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> .or. ;<br />                                         nKey == VK_RETURN,;<br />                                       <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoNextCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />                                       <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_TAB .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_SHIFT <span style="color: #000000;">&#41;</span>,;<br />                                       <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoPrevCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">endif</span></div>[/code:33u2wnnn] This code from ::redefine is in this case not required [code=fw:33u2wnnn]<div class="fw" id="{CB}" style="font-family: monospace;"> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> nKey == VK_TAB .and. ! GetKeyState<span style="color: #000000;">&#40;</span> VK_SHIFT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> .or. ;<br />                                         nKey == VK_RETURN,;<br />                                       <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoNextCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />                                       <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_TAB .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_SHIFT <span style="color: #000000;">&#41;</span>,;<br />                                       <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoPrevCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:33u2wnnn]
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, please check my last post. What function can i (we) use to gain the information from the RC-file that a Combobox has a decidedly style ???
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, See these defines: #define CBS_DROPDOWN 0x0002 #define CBS_DROPDOWNLIST 0x0003 So you could use: nAnd( GetWindowLong( ::hWnd, GWL_STYLE ), CBS_DROPDOWNLIST ) == CBS_DROPDOWNLIST Don't use CBS_DROPDOWN in the above line, because CBS_DROPDOWN is contained in CBS_DROPDOWNLIST: CBS_DROPDOWN ==> 0000 0010 CBS_DROPDOWNLIST ==> 000 0011
BUG: COMBOBOX with style CBS_DROPDOWN
From what moment on i can use GetWindowLong( ::hWnd, GWL_STYLE )->(::hWnd is existent)? Can we transfer the definition from the ::oGet in method init()?
BUG: COMBOBOX with style CBS_DROPDOWN
Günther, From this moment on: ::Create( "COMBOBOX" ) // Method New() the control has been created and ::hWnd should be valid.
BUG: COMBOBOX with style CBS_DROPDOWN
When the Method Initiate() is invoked, the control already exists and ::hWnd should be valid too <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio, i had sent to your private email the Combobox.prg with all my changes. Additional please note this points: 1.) SetFocusColor() is not activ 2.) Picture-clausula should also represented on the Combobox, not only while editing.
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio I have been watching this thread with interest .. One behavior that I have not seen discussed with CBS_DROPDOWN is the incremental search. I like the fact that you can enter any text into the CBS_DROPDOWN and and the field accepts that text .. however ( as in my screenshot ) the incremental search does not activate like CBS_DROPDOWNLIST. ( fwh1203 ) [url=http&#58;//imageshack&#46;us/photo/my-images/195/combo1m&#46;jpg/:rprgsnpn][img:rprgsnpn]http&#58;//img195&#46;imageshack&#46;us/img195/7000/combo1m&#46;jpg[/img:rprgsnpn][/url:rprgsnpn] I was hoping while you were looking at the Combobox code you might have a look at making the CBS_DROPDOWN behavior match the CBS_DROPDOWNLIST when you begin typing activating the incremental search.... I did not see that addressed in this thread and that feature may have been fixed since FWH1203 ? Thanks Rick Lipkin
BUG: COMBOBOX with style CBS_DROPDOWN
Rick, If we take FWH/samples/combos.prg as a reference, there are three combos. Which combo behavior is the right for you ? thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio Combobox 2 ( cbs_dropdown ) does not search the array when you type in a value. In the screenshot .. I typed in the letter "T" into the CBS_Dropdown and T in the third combobox ( cbs_DropdownList) .. as you can see .. the behavior is quite different. If the second combobox can incrementally seek the typed value .. I would be most pleased. It appears this code fails in my example. Thanks Rick Lipkin [code=fw:ivtmxjr2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx2 <span style="color: #0000ff;">VAR</span> cItem2 <span style="color: #0000ff;">ITEMS</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> ;<br />      <span style="color: #0000ff;">ID</span> ID_DROPDOWN <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> cItem4 := cItem2, oSay:<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 />      <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! oCbx2:<span style="color: #000000;">Find</span><span style="color: #000000;">&#40;</span> oCbx2:<span style="color: #000000;">oGet</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 />                  oCbx2:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> oCbx2:<span style="color: #000000;">oGet</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>,<span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span><br />                  <br />   oCbx2:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyDown</span> = <span style="color: #000000;">&#123;</span> | nKey | SearchItem<span style="color: #000000;">&#40;</span> nKey, oCbx2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// fails to find</span><br /> </div>[/code:ivtmxjr2] [url=http&#58;//imageshack&#46;us/photo/my-images/849/combos1&#46;jpg/:ivtmxjr2][img:ivtmxjr2]http&#58;//img849&#46;imageshack&#46;us/img849/8795/combos1&#46;jpg[/img:ivtmxjr2][/url:ivtmxjr2]
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio .. Just wanted to see if you had a chance to look at my results from the previous post? Many Thanks! Rick Lipkin
BUG: COMBOBOX with style CBS_DROPDOWN
Rick, I missed your previous post, don't know why, sorry <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> I am going to review your comments, thanks
BUG: COMBOBOX with style CBS_DROPDOWN
Rick, I have been doing some quick tests on combos.prg to see whats going on. I have not finished it yet, but this example helps to trace whats going on: modified combos.prg [code=fw:1honttgn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Showing the use of different styles of ComboBoxes controls</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;">"Combos.ch"</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> oDlg, oSay<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCbx1, oCbx2, oCbx3<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cItem1, cItem2 := <span style="color: #ff0000;">"One"</span>, cItem3, cItem4 := <span style="color: #ff0000;">"None"</span><br /><br />&nbsp; &nbsp;SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// SkinButtons()</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Combos"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx1 <span style="color: #0000ff;">VAR</span> cItem1 <span style="color: #0000ff;">ITEMS</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> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> ID_SIMPLE <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> cItem4 := cItem1, oSay:<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; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> cItem4 := cItem1, oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx2 <span style="color: #0000ff;">VAR</span> cItem2 <span style="color: #0000ff;">ITEMS</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> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> ID_DROPDOWN <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> cItem4 := cItem2, oSay:<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; <span style="color: #B900B9;">// VALID ( If( ! oCbx2:Find( oCbx2:oGet:GetText() ),;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCbx2:Add( oCbx2:oGet:GetText() ),), .t. )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;oCbx2:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey | SearchItem<span style="color: #000000;">&#40;</span> nKey, oCbx2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx3 <span style="color: #0000ff;">VAR</span> cItem3 <span style="color: #0000ff;">ITEMS</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> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> ID_DROPDOWNLIST <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> cItem4 := cItem3, oSay:<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; <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> cItem4 := cItem3, oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cItem4 <span style="color: #0000ff;">ID</span> ID_SELECTION <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"R+/W"</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 /><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> SearchItem<span style="color: #000000;">&#40;</span> nKey, oCbx <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt, cText<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</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; &nbsp; oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cText = AllTrim<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span>, <span style="color: #000000;">&#123;</span> | c | Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> c, Len<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</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; Upper<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> nKey &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:1honttgn]
BUG: COMBOBOX with style CBS_DROPDOWN
This version behaves better: [code=fw:1by8gz7r]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> SearchItem<span style="color: #000000;">&#40;</span> nKey, oCbx <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt, cText<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nKey >= <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"a"</span> <span style="color: #000000;">&#41;</span> .and. nKey >= <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cText = AllTrim<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span>, <span style="color: #000000;">&#123;</span> | c | Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> c, Len<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</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;Upper<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> nKey &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp;</div>[/code:1by8gz7r]
BUG: COMBOBOX with style CBS_DROPDOWN
An enhanced version: [code=fw:2jzsy78d]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> SearchItem<span style="color: #000000;">&#40;</span> nKey, oCbx <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt, cText<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nKey >= <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"a"</span> <span style="color: #000000;">&#41;</span> .and. nKey >= <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cText = AllTrim<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span>, <span style="color: #000000;">&#123;</span> | c | Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> c, Len<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</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;Upper<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">pos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> nKey</div>[/code:2jzsy78d]
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio It appears to be working .. however, now that it incrementally finds "One", "Two" or "Three" .. if the search finds a match, it does not allow you to keep adding letters for a user defined entry. I think you are VERY CLOSE!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Rick Lipkin
BUG: COMBOBOX with style CBS_DROPDOWN
If we find a way to increase the size (of the internal buffer) of a Clipper's GET then we may be able to have it too... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUG: COMBOBOX with style CBS_DROPDOWN
A quick workaround would be to use wider items: [code=fw:24oo6qlh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"one &nbsp; &nbsp; &nbsp; &nbsp;"</span>, <span style="color: #ff0000;">"two &nbsp; &nbsp; &nbsp; &nbsp; "</span>, <span style="color: #ff0000;">"three &nbsp; &nbsp; &nbsp; &nbsp; "</span> <span style="color: #000000;">&#125;</span></div>[/code:24oo6qlh] I am trying to change the size of the Clipper GET without success yet...
BUG: COMBOBOX with style CBS_DROPDOWN
Antonio Thats fine .. generally I build my arrays on the length of the field anyway .. Do I need to include the SearchItem function in my code or is that something that can be added to your FWH Libs? Thanks Rick Lipkin
BUG: COMBOBOX with style CBS_DROPDOWN
Rick, We should place it inside Class TComboBox so there is no need to modify your sources ::oGet:bKeyChar is already used from the Class, so we need to implement a new method: [code=fw:hbspkjpf]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> GetKeyChar<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TComboBox<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt, cText<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nKey == VK_TAB .and. ! GetKeyState<span style="color: #000000;">&#40;</span> VK_SHIFT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> .or. nKey == VK_RETURN<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoNextCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nKey == VK_TAB .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_SHIFT <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoPrevCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nKey >= <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"a"</span> <span style="color: #000000;">&#41;</span> .and. nKey >= <span style="color: #0000ff;">Asc</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Insert</span><span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cText = AllTrim<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">buffer</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aItems</span>, <span style="color: #000000;">&#123;</span> | c | Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> c, Len<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</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;Upper<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">pos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> nKey &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp;</div>[/code:hbspkjpf] and in the two places where bKeyChar is used in the class, change them to this: ::oGet:bKeyChar = { | nKey | ::GetKeyChar( nKey ) }
BUG: COMBOBOX with style CBS_DROPDOWN
Antiono Thank you very much! .. it is about time for me to start up my FTDN subscription .. I appreciate your expertise and Help. Rick Lipkin
BUG: FONTS NOT RELEASED IN LATEST FWH
Hi, Those fonts are not released: -- FONT,-1710615546,TWINDOW:GETFONT(2995)->TWINDOW:NEW(960)->MAIN(657) -- BRUSH,152049635,TRPANEL:REGISTER(779)->TRPANEL:NEW(50)->TRIBBONBAR:NEW(314)->MAIN(664) -- FONT,-1811279512,TRICHEDIT:REDEFINE(403)->ALTASCLIENTE(1527)->->TXBROWSE:LDBLCLICK(5071)->TWINDOW:HANDLEEVENT(0)->TCONTROL:HANDLEEVENT(1801)->TXBROWSE:HANDLEEVENT(11221)->_FWH(3559)->DIALOGBOXINDIRECT(0)->TDIALOG:ACTIVATE(304)->VERCLIENTES(2036)->(b)MAIN(685)->TRBTN:CLICK(717)->TRBTN:LBUTTONUP(917)->TCONTROL:HANDLEEVENT(1791)->TRBTN:HANDLEEVENT(1575)->_FWH(3559)->WINRUN(0)->TWINDOW:ACTIVATE(1097)->MAIN(761) ==================================================================================================== Thank you.
BUG: FONTS NOT RELEASED IN LATEST FWH
At the end of your app Release ofontname
BUG: FONTS NOT RELEASED IN LATEST FWH
Silvio, I haven't defined any font, these are Fivewin's internal fonts.
BUG: FONTS NOT RELEASED IN LATEST FWH
[quote="MOISES":2v54klc7]Silvio, I haven't defined any font, these are Fivewin's internal fonts.[/quote:2v54klc7] I do not get any message of resources not destroyed in any of my applications (for example FivEdit uses more than 20 fonts in the different controls). It is usually an incorrect assignment of the font, for example (:: oFont: = oFont1, instead of using its method :: SetFont (oFont1))
BUG: FONTS NOT RELEASED IN LATEST FWH
Cristóbal, Can you please try to use a Ribbon and a RICHEDIT control? I don´t define fonts, so it is an internal issue of Fivewin. Thank you.
BUG: FONTS NOT RELEASED IN LATEST FWH
It is possible that there is some control in which this problem occurs. Can you give a simple example to check?
BUG: FONTS NOT RELEASED IN LATEST FWH
Sure. This is a RTF sample: [code=fw:308kk4ce]<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;">"richedit.ch"</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> oDlg, oRich, cRtf := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> hRichDLL := LoadLibrary<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"riched20.dll"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lBold := .F., nPos := <span style="color: #000000;">0</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Debug Checkres</span><br />&nbsp; &nbsp;FErase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"checkres.txt"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SetResDebug<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br />&nbsp; &nbsp;cRtf:=<span style="color: #ff0000;">"{<span style="color: #000000;">\r</span>tf1<span style="color: #000000;">\a</span>nsi<span style="color: #000000;">\d</span>eff0{<span style="color: #000000;">\f</span>onttbl{<span style="color: #000000;">\f</span>0<span style="color: #000000;">\f</span>nil<span style="color: #000000;">\f</span>charset0 Courier New;}}"</span>+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"{<span style="color: #000000;">\c</span>olortbl ;<span style="color: #000000;">\r</span>ed0<span style="color: #000000;">\g</span>reen77<span style="color: #000000;">\b</span>lue187;<span style="color: #000000;">\r</span>ed192<span style="color: #000000;">\g</span>reen80<span style="color: #000000;">\b</span>lue77;}"</span>+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"{<span style="color: #000000;">\*</span><span style="color: #000000;">\g</span>enerator Msftedit 5.41.21.2510;}<span style="color: #000000;">\v</span>iewkind4<span style="color: #000000;">\u</span>c1<span style="color: #000000;">\p</span>ard<span style="color: #000000;">\c</span>f1<span style="color: #000000;">\l</span>ang1031<span style="color: #000000;">\f</span>0<span style="color: #000000;">\f</span>s22 This is <span style="color: #000000;">\b</span> colored <span style="color: #000000;">\b</span>0 text<span style="color: #000000;">\c</span>f0 . <span style="color: #000000;">\c</span>f2 The background is color 1 and the foreground is color 2<span style="color: #000000;">\c</span>f0<span style="color: #000000;">\p</span>ar"</span>+CRLF+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"}"</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Test"</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> RICHEDIT oRich <span style="color: #0000ff;">VAR</span> cRTF &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//oRich:lHighLight = .f.</span><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oRich:<span style="color: #000000;">LoadFromRTFFile</span><span style="color: #000000;">&#40;</span> cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Archivo RTF (*.rtf) | *.rtf"</span> <span style="color: #000000;">&#41;</span>, oRich:<span style="color: #000000;">SetFocus</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 /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lBold := ! lBold, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRich:<span style="color: #000000;">SetBold</span><span style="color: #000000;">&#40;</span> lBold <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRich:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">cTitle</span> := <span style="color: #ff0000;">"IsBold "</span>+cValtoChar<span style="color: #000000;">&#40;</span>lBold<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;oRich:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cRtf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//oRich:bGotFocus = { || oRich:HideSel(), oRich:SetSel( nPos, nPos ) }</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//oRich:bLostFocus = { || nPos := oRich:GetPos() }</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;FreeLibrary<span style="color: #000000;">&#40;</span> hRichDLL <span style="color: #000000;">&#41;</span><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/* CheckRes Recursos FWH*/</span><br />&nbsp; &nbsp;CheckRes<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;WinExec<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"notepad checkres"</span><span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:308kk4ce] Bug at: TRICHEDIT:REDEFINE(403)- You have an unreleased Font, defined in both new and redefine methods. Thank you.
BUG: FONTS NOT RELEASED IN LATEST FWH
Please send me .rc file, thanks
BUG: FONTS NOT RELEASED IN LATEST FWH
Sure, here is: [code=fw:2f20f45q]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><span style="color: #00D7D7;">#define</span> IDC_EDIT1 &nbsp; <span style="color: #000000;">101</span><br /><br />Test <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">409</span>, <span style="color: #000000;">199</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Testing the RichEdit control"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp;CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"RichEdit20A"</span>, <span style="color: #000000;">4100</span> | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, <span style="color: #000000;">6</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">398</span>, <span style="color: #000000;">163</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&Load text file"</span>, <span style="color: #000000;">110</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">179</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br />&nbsp;PUSHBUTTON <span style="color: #ff0000;">"&Bold"</span>, <span style="color: #000000;">120</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">179</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">16</span><br /><br /><span style="color: #000000;">&#125;</span></div>[/code:2f20f45q] Thank you.
BUG: FONTS NOT RELEASED IN LATEST FWH
Moises, thanks, you are right Please modify METHOD Redefine in TRichEdit CLASS [code=fw:11p5ebrt]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, oWnd, nHelpId, oFont, cMsg, lReadOnly, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lHighlight, cFileName, nRTFSize, lNoURL, bWhen, bValid, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bChanged <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TRichEdit<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lReadOnly &nbsp;:= .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lHighlight := .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFileName &nbsp;:= <span style="color: #ff0000;">""</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRTFSize &nbsp; := <span style="color: #000000;">1024</span> * <span style="color: #000000;">1024</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lNoURL &nbsp; &nbsp; := .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd &nbsp; &nbsp; &nbsp; := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nId</span> &nbsp; &nbsp; &nbsp; = nId<br />&nbsp; &nbsp;::<span style="color: #000000;">bSetGet</span> &nbsp; = bSetGet<br />&nbsp; &nbsp;::<span style="color: #000000;">uOriginalValue</span> = Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span> &nbsp; &nbsp; &nbsp;= oWnd<br />&nbsp; &nbsp;::<span style="color: #000000;">nHelpId</span> &nbsp; = nHelpId<br />&nbsp; &nbsp;::<span style="color: #000000;">cMsg</span> &nbsp; &nbsp; &nbsp;= cMsg<br />&nbsp; &nbsp;::<span style="color: #000000;">bWhen</span> &nbsp; &nbsp; = bWhen<br />&nbsp; &nbsp;::<span style="color: #000000;">bValid</span> &nbsp; &nbsp;= bValid<br />&nbsp; &nbsp;::<span style="color: #000000;">lReadOnly</span> = lReadOnly<br />&nbsp; &nbsp;::<span style="color: #000000;">bChange</span> &nbsp; = bChanged<br />&nbsp; &nbsp;::<span style="color: #000000;">cFileName</span> = cFileName<br />&nbsp; &nbsp;::<span style="color: #000000;">nRTFSize</span> &nbsp;= <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRTFSize, <span style="color: #000000;">32</span> * <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lURL</span> &nbsp; &nbsp; &nbsp;= !lNoURL<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lHighlight</span> &nbsp;= lHighlight<br />&nbsp; &nbsp;::<span style="color: #000000;">aKeywords1</span> &nbsp;= <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CLASS"</span>, <span style="color: #ff0000;">"FROM"</span>, <span style="color: #ff0000;">"ENDCLASS"</span>, <span style="color: #ff0000;">"DATA"</span>, <span style="color: #ff0000;">"AS"</span>, <span style="color: #ff0000;">"METHOD"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"CONSTRUCTOR"</span>, <span style="color: #ff0000;">"function"</span>, <span style="color: #ff0000;">"return"</span>, <span style="color: #ff0000;">"OBJECT"</span>, <span style="color: #ff0000;">"ENDOBJECT"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aKeywords2</span> &nbsp;= <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"#include"</span>, <span style="color: #ff0000;">"Self"</span>, <span style="color: #ff0000;">"nil"</span>, <span style="color: #ff0000;">"public"</span>, <span style="color: #ff0000;">"local"</span>, <span style="color: #ff0000;">"Super"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">cSeparators</span> = <span style="color: #ff0000;">" +-()[]:*/{},="</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nClrNumber</span> &nbsp; &nbsp;= CLR_HMAGENTA<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrString</span> &nbsp; &nbsp;= CLR_YELLOW<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrComment</span> &nbsp; = CLR_HBLUE<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrSeparator</span> = CLR_WHITE<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrText</span> &nbsp; &nbsp; &nbsp;= CLR_BLACK<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrKey1</span> &nbsp; &nbsp; &nbsp;= CLR_HGREEN<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrKey2</span> &nbsp; &nbsp; &nbsp;= CLR_HCYAN<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oFont == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">oFont</span> <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> LargeFonts<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">-11</span>, <span style="color: #000000;">-13</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetOleInit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//::Register( nOr( CS_VREDRAW, CS_HREDRAW, CS_DBLCLKS ) )</span><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:11p5ebrt] and in CLASS TRICHEDIT5 ( fwh\source\classes\triched5.prg ) [code=fw:11p5ebrt]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, oWnd, nHelpId, oFont, cMsg, lReadOnly, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lHighlight, cFileName, nRTFSize, lNoURL, bWhen, bValid, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bChanged, nLeftMargin, lNew <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TRichEdit5<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> &nbsp; cDll<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lReadOnly &nbsp;:= .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lHighlight := .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFileName &nbsp;:= <span style="color: #ff0000;">""</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRTFSize &nbsp; := <span style="color: #000000;">1024</span> * <span style="color: #000000;">1024</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lNoURL &nbsp; &nbsp; := .f., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd &nbsp; &nbsp; &nbsp; := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLeftMargin := <span style="color: #000000;">0</span><span style="color: #B900B9;">//, ;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lNew &nbsp; &nbsp; &nbsp; &nbsp;:= .T.<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lUnicode</span> &nbsp;:= FW_SetUnicode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nId</span> &nbsp; &nbsp; &nbsp; := nId<br />&nbsp; &nbsp;::<span style="color: #000000;">bSetGet</span> &nbsp; := bSetGet<br />&nbsp; &nbsp;::<span style="color: #000000;">uOriginalValue</span> = Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span> &nbsp; &nbsp; &nbsp;:= oWnd<br />&nbsp; &nbsp;::<span style="color: #000000;">nHelpId</span> &nbsp; := nHelpId<br />&nbsp; &nbsp;::<span style="color: #000000;">cMsg</span> &nbsp; &nbsp; &nbsp;:= cMsg<br />&nbsp; &nbsp;::<span style="color: #000000;">bWhen</span> &nbsp; &nbsp; := bWhen<br />&nbsp; &nbsp;::<span style="color: #000000;">bValid</span> &nbsp; &nbsp;:= bValid<br />&nbsp; &nbsp;::<span style="color: #000000;">lReadOnly</span> := lReadOnly<br />&nbsp; &nbsp;::<span style="color: #000000;">bChange</span> &nbsp; := bChanged<br />&nbsp; &nbsp;::<span style="color: #000000;">cFileName</span> := cFileName<br />&nbsp; &nbsp;::<span style="color: #000000;">nRTFSize</span> &nbsp;:= <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRTFSize, <span style="color: #000000;">32</span> * <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lURL</span> &nbsp; &nbsp; &nbsp;:= !lNoURL<br />&nbsp; &nbsp;::<span style="color: #000000;">lCaptured</span> := .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lNew<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCtrl_Class</span> &nbsp; := <span style="color: #ff0000;">"RichEdit50W"</span><br />&nbsp; &nbsp; &nbsp; cDll &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">"Msftedit.dll"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCtrl_Class</span> &nbsp; := <span style="color: #ff0000;">"RichEdit20A"</span><br />&nbsp; &nbsp; &nbsp; cDll &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">"RichEd20.dll"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">nInst</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hLib</span> := LoadLibrary<span style="color: #000000;">&#40;</span> cDll <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nInst</span> ++<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> bSetGet &nbsp;!= <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCaption</span> := cValToChar<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> bSetGet <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCaption</span> := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lHighlight</span> &nbsp;:= lHighlight<br />&nbsp; &nbsp;::<span style="color: #000000;">aKeyWords1</span> &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aKeyWords1</span> &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">cSeparators</span> := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aCharFormat</span> := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> &nbsp; <span style="color: #B900B9;">// Array( 14 )</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nClrNumber</span> &nbsp; &nbsp;:= CLR_HMAGENTA<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrString</span> &nbsp; &nbsp;:= CLR_YELLOW<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrComment</span> &nbsp; := CLR_HBLUE<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrSeparator</span> := CLR_WHITE<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrText</span> &nbsp; &nbsp; &nbsp;:= CLR_BLACK<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrKey1</span> &nbsp; &nbsp; &nbsp;:= CLR_HGREEN<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrKey2</span> &nbsp; &nbsp; &nbsp;:= CLR_HCYAN<br />&nbsp; &nbsp;::<span style="color: #000000;">nClrProtect</span> &nbsp; := CLR_HRED<br />&nbsp; &nbsp;::<span style="color: #000000;">nMarginLeft</span> &nbsp; := nLeftMargin<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oFont == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">oFont</span> <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> LargeFonts<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">-11</span>, <span style="color: #000000;">-13</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">aTableFormat</span> &nbsp;:= Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aPos</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aOldPos</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetOleInit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">SendMsg</span><span style="color: #000000;">&#40;</span> WM_SETFONT, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetFont2RTF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// to adjust point size</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lHighlight</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">HighLightAllText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// PostMessage( ::hWnd, FM_HIGHLIGHTALL )</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nMarginLeft</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:11p5ebrt] I recommend that you use the new TRICHEDIT5 class
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
On this type of editstyle we can input a free text in this col, but when i open and then only close the Combobox without select any item, this text are instantly overwritten with the first item from the list. Another error when i Input TAB on the open listbox: [quote:1pvi79zk]Error BASE/1005 Class: 'NIL' has no property: NLASTKEY Args: [ 1] = U [ 2] = N 13[/quote:1pvi79zk]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Günther, I have fixed it this way. Search for LISTBOX inside xbrowse.prg and change this: [code=fw:3r1mokce]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">LISTBOX</span> ::<span style="color: #000000;">oEditLbx</span> <span style="color: #0000ff;">VAR</span> nAt <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oBrw</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">ITEMS</span> ::<span style="color: #000000;">aEditListTxt</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> aColors<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aColors<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span> | oLbx, hWndFocus | ::<span style="color: #000000;">PostEdit</span><span style="color: #000000;">&#40;</span> aBound<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, nAt <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bLButtonUp</span> := <span style="color: #000000;">&#123;</span>|| ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nLastKey</span> := VK_RETURN,<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">PostEdit</span><span style="color: #000000;">&#40;</span> aBound<span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span>, .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bChange</span> = <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nLastKey</span> := VK_RETURN,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nDlgCode</span> = DLGC_WANTALLKEYS<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span>|k| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nLastKey</span> := k,<span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; ...<br />&nbsp;</div>[/code:3r1mokce] also here: [code=fw:3r1mokce]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> ::<span style="color: #000000;">nEditType</span> == EDIT_LISTBOX<br />&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; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bEditWhen</span> == <span style="color: #00C800;">nil</span> .or. Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bEditWhen</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nLastKey</span> == VK_RETURN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bOnPostEdit</span>, <span style="color: #00C800;">Self</span>, xValue, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nLastKey</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:3r1mokce] with those changes this example seems to be working fine: [code=fw:3r1mokce]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, aValues := <span style="color: #000000;">&#123;</span> Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">300</span><br />&nbsp; &nbsp;<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> oDlg ;<br />&nbsp; &nbsp; &nbsp; FIELDS aValues<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aValues<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; COLSIZES <span style="color: #000000;">220</span>, <span style="color: #000000;">220</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp;= EDIT_GET_LISTBOX<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"111111"</span>, <span style="color: #ff0000;">"22222"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span> &nbsp;= <span style="color: #000000;">&#123;</span> | o, v | <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> v <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">oClient</span> = oBrw<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> oDlg:<span style="color: #000000;">ReSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3r1mokce]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
This seems a better implementation, as now we can use Enter to select an item: [code=fw:2n5g8e72]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">LISTBOX</span> ::<span style="color: #000000;">oEditLbx</span> <span style="color: #0000ff;">VAR</span> nAt <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oBrw</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">ITEMS</span> ::<span style="color: #000000;">aEditListTxt</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> aColors<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aColors<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span> | oLbx, hWndFocus | ::<span style="color: #000000;">PostEdit</span><span style="color: #000000;">&#40;</span> aBound<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, nAt <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bLButtonUp</span> := <span style="color: #000000;">&#123;</span>|| ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">PostEdit</span><span style="color: #000000;">&#40;</span> aBound<span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span>, .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bChange</span> = <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nLastKey</span> := VK_RETURN,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">nDlgCode</span> = DLGC_WANTALLKEYS<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span> | nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_RETURN,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</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; ::<span style="color: #000000;">PostEdit</span><span style="color: #000000;">&#40;</span> aBound<span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span>, .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp;</div>[/code:2n5g8e72]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Antonio, editing now is OK! Thanks. But two points are also to do: 1.) If the listbox are on bottom half in the xbrowse not the full list are shown on opening. The list is clipped in some cases! 2.) When i Input TAB on the opened listbox: [quote:rjq3ve3k]Error BASE/1005 Class: 'NIL' has no exported method: CHANGE Args: [ 1] = U[/quote:rjq3ve3k]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Antonio, please look also on this last two Points! Many thanks!
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Günther, Please go to line 11135 in xbrowse.prg and change this: ::oEditLbx:Move( nRow, nCol, nWidth, nHeight, .t. ) to nRow = If( nRow + nHeight > ::nHeight, ::nHeight - nHeight, nRow ) ::oEditLbx:Move( nRow, nCol, nWidth, nHeight, .t. )
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
For the Tab error please modify this in line 11125: [code=fw:37xdptnp]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oEditLbx</span>:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span> | nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_RETURN,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oEditLbx</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oEditLbx</span>:<span style="color: #0000ff;">Change</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">PostEdit</span><span style="color: #000000;">&#40;</span> aBound<span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span>, .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:37xdptnp]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Antonio, this has no effect. Also your line-numbers are not from 13.3 ?? [quote:2brl59wf]Please go to line 11135 in xbrowse.prg and change this: ::oEditLbx:Move( nRow, nCol, nWidth, nHeight, .t. ) to nRow = If( nRow + nHeight > ::nHeight, ::nHeight - nHeight, nRow ) ::oEditLbx:Move( nRow, nCol, nWidth, nHeight, .t. )[/quote:2brl59wf]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Günther, Look for ::oEditLbx:Move in xbrowse.prg, there is only one occurrence and change it there as explained. I have not tested it myself, but I think it should work <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Antonio, not the right effect! Only the last visible row claps the listbox to top. All other rows claps the listbox down with vertical scroll and would be pressed and pressed. In my opinion the following code is the point to Show! [code=fw:1usjczrs]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">If</span> nRow + nHeight > ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">BrwHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">BrwHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nRow<span style="color: #000000;">&#41;</span> < ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nRowHeight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> nRow - &nbsp;nHeight - ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nRowHeight</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> < <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nHeight -= FontHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oBrw</span>, ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRow := &nbsp;nRow - nHeight - ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nRowHeight</span> + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nHeight := ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">BrwHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nRow<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Endif</span></div>[/code:1usjczrs]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Günther, If you try this example, with my changes, it shows fine: gunther4.prg [code=fw:2qjphklq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, aValues := <span style="color: #000000;">&#123;</span> Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, n<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> <span style="color: #000000;">50</span><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aValues, ATail<span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span> &nbsp; <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">300</span><br />&nbsp; &nbsp;<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> oDlg ;<br />&nbsp; &nbsp; &nbsp; FIELDS aValues<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aValues<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; COLSIZES <span style="color: #000000;">220</span>, <span style="color: #000000;">220</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aValues <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp;= EDIT_GET_LISTBOX<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"111111"</span>, <span style="color: #ff0000;">"22222"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span> &nbsp;= <span style="color: #000000;">&#123;</span> | o, v | <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> v <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">oClient</span> = oBrw<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> oDlg:<span style="color: #000000;">ReSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2qjphklq] [img:2qjphklq]http&#58;//img19&#46;imageshack&#46;us/img19/6725/lafotocj&#46;jpg[/img:2qjphklq]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Antonio, please use a list with more (10 or so) items and test it [b:23xhl5q4]not[/b:23xhl5q4] on the last visible row but one or two rows above!
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Günther, This seems to be a better fix: nRow = If( nRow + nHeight > ::oBrw:nHeight, nRow - nHeight - ::oBrw:nRowHeight, nRow ) Still we should be able to avoid the bottom scrollbar too, thats pending and yes, that section of code that you mentioned, does not seem to be needed anymore, thanks [img:35vswcuk]http&#58;//img40&#46;imageshack&#46;us/img40/2349/lafotosc&#46;JPG[/img:35vswcuk]
BUG: XBROWSE editstyle EDIT_GET_LISTBOX
Antonio it works! If also the vscroll are functioning, this is a perfect thing. Is it possibility, the listbox drawing over the size from the browse as it is also on normal dialogs?