topic
stringlengths
1
63
text
stringlengths
1
577k
Combobox focus problem
Hi, Why combobox control (dropdown list) inside a folder dont display a doted focus line? Using Manifest Theme. Any tricks? Porque los combobox não mostram a linha pontilhada quando se tem o foco dentro de um folder? Thanks in advance. Wanderson.
Combobox focus problem
Example?
Combobox focus problem
please try this. [url:393wk9g5]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=38603&p=230373&hilit=alt+key#p230373[/url:393wk9g5]
Combobox focus problem
[quote="carlos vargas":3mqnxtsl]please try this. [url:3mqnxtsl]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=38603&p=230373&hilit=alt+key#p230373[/url:3mqnxtsl][/quote:3mqnxtsl] Gracias Carlos Vargas, funcionou!
Combobox focus problem
[quote="karinha":1ynwwlgt]Example?[/quote:1ynwwlgt] Karinha, obrigado, Carlos Vargas solucionou o problema!
Combobox focus problem
Hola.. retomando este hilo.. . la solución propuesta es correcta, se soluciona, pero para mi compu, pienso más en las compus de los clientes, habrá alguna posibilidad de modificar algo en el programa para que no tengamos que retocar el Panel de Control de cada cliente?? Muchas gracias por su ayuda!! Roberto
Combobox font problem
Hi all, Why combobox don't display the same font like gets if i use when .f.? [url=http://img265.imageshack.us/i/combobox.jpg/:3psjixcr][img:3psjixcr]http://img265.imageshack.us/img265/5653/combobox.jpg[/img:3psjixcr][/url:3psjixcr] Thanks in advance.
Combobox font problem
Antonio any idea? Thanks.
Combobox font problem
[code=fw:2dag4gi2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-14</span> BOLD<br /><br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">TO</span> oFont<br /><br />&nbsp;</div>[/code:2dag4gi2] Regards
Combobox in Folder
It's the Folder time today ;- ) Well, another problem - simple, I hope. When I have the focus on a combobox in a dialog and I press the Enter key then the focus go to the next control (a get for example) The problem is that it doesn't runs on a folder. If I have the focus on a combobox in a folder and I press the Enter key then the focus REMAINS ON THE COMBOBOX instead to go to the next control. The self-contained at <!-- w --><a class="postlink" href="http://www.softwarexp.co.uk/beta/test.zip">www.softwarexp.co.uk/beta/test.zip</a><!-- w --> show this problem. I checked the folder,tcontrol and combobox class looking for a solution but unsuccesfully. Any solution availables ? Thanks in advance Best Regards, Marco
Combobox in Folder
Marco, Just add this method to Class TComboBox: [code:2nzjsjig] METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TComboBox if nKey == VK_RETURN &#58;&#58;oWnd&#58;GoNextCtrl&#40; &#58;&#58;hWnd &#41; endif return nil [/code:2nzjsjig]
Combobox in Folder
Yes, runs fine. Thanks for your quick reply. Best Regards, Marco
Combobox in Folder
Great! EMG
Combobox in Folder
Marco, Keep in mind that using the Enter key to move from field to field is DOS program behavior NOT Windows program behavior. Users expect the Enter key to trigger the default pushbutton (ususally OK). They will surprised and disappointed when it doesn't. There is good reason to have it trigger the default pushbutton. This makes it easy to edit and save without having to use the mouse. If Enter moves to the next control then they have to go through all the controls to get to the button or use the mouse. James
Combobox in Folder
I already tried to convice him but there is no hope. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Combobox in Folder
James, you are right. However about my specific situation my target was a quick migration to my customers from my old Clipper app to the new FWH app to avoid the costs of two platforms updates and I could make it immediatly leaving the same input process in the new Windows app. Furthermore there still are a lot of customers coming from DOS , Windows "hibrid" and terminal mode apps so provide this input process still have a commercial advantages. In a data insert dialog like: >combobox >combobox >get >get >button (to write data) the end user only need to press the same Enter key to complete the input sequence and write data on disk - like a DOS app - but can also work with mouse if it prefer. Best Regards, Marco
Combobox in Folder
If the application is a orginally developed for the 1st time in Windows ( not migrated from any DOS based application ), Mr.James statement is correct. But in other case I agree with Mr.Marco. - Ramesh Babu
Combobox in toolbar
I would want to insert a combobox in the toolbar between the buttons. How I can make? Thanks in advance. Pier Luigi
Combobox in toolbar
Try [code:167busgc]@ row, col COMBOBOX &#46;&#46;&#46; OF oBar[/code:167busgc] EMG
Combobox in toolbar
I write [code:32hfblte] &#46;&#46;&#46; oToolBar&#58;AddButton&#40; &#123; || MsgInfo&#40;&#41; &#125;, nil, nil &#41; // 1 oToolBar&#58;AddButton&#40; &#123; || MsgInfo&#40;&#41; &#125;, nil, nil &#41; // 2 @ row, col COMBOBOX &#46;&#46;&#46; OF oToolBar oToolBar&#58;AddButton&#40; &#123; || MsgInfo&#40;&#41; &#125;, nil, nil &#41; // 3 oToolBar&#58;AddButton&#40; &#123; || MsgInfo&#40;&#41; &#125;, nil, nil &#41; // 4 &#46;&#46;&#46; [/code:32hfblte] The combobox is inserted at row/col, but over the buttons 3 and 4. How I can distance the buttons? Pier Luigi
Combobox in toolbar
You may try using oBtn:Move() method. EMG
Combobox incremental seek bug
Hi, I think there is a bug using the incremental seek in a combobox. In this self-contained sample at: <!-- w --><a class="postlink" href="http://www.softwarexp.co.uk/beta/combo.zip">www.softwarexp.co.uk/beta/combo.zip</a><!-- w --> I have and array with 3 elements: First, Second, Third, When the combobox has the focus press the "S" key to go to the "Second" element then press the "Give me the position" button and you will see that the position value is not the numeric value but the string "Second". Any ideas ? Marco
Combobox incremental seek bug
Marco: Pls try with a numeric var as follow: acMonths := {"Jan","Feb","Mar","Apr","May","Jun",; "Jul","Aug","Sep","Oct","Nov","Dec"} nMonth := 1 REDEFINE COMBOBOX oGet VAR nMonth ID 100 OF oDlg; PROMPTS acMonths Regards, Armando
Combobox incremental seek bug
Nothing to do. If I select the month pressing the first key the return value will be the string instead of the numeric position. See <!-- w --><a class="postlink" href="http://www.softwarexp.co.uk/beta/test.png">www.softwarexp.co.uk/beta/test.png</a><!-- w --> This problem appairs with the latest fivewin version,the FWH April 2006 build runs fine. Marco
Combobox incremental seek bug
Marco, Please make this change at source\classes\combobox.prg line 506: ::Set( If( ValType( Eval( ::bSetGet ) ) == "N", AScan( ::aItems, uItem ), uItem ) )
Combobox incremental seek bug
Yes, the return value is correct now but the incremental seek runs only for the first key pressed. You can easely check it in the sample I gave you. Marco
Combobox incremental seek bug
Marco, It seems to work fine. Please remember that you have to press Space in order to make a new search
Combobox incremental seek bug
Yes, pressing SPACE the seek reinitialize itself but this solution is really unpracticol for the customer. For example if you have an array like: Antonio Fabio Andrea Marco Alfonso .. .. Alexandro with the old FWH April 2006 the customer simply pressing "A" go to the first name that start with this character and then can scroll all the name below simply re-pressing "A". with this latest FWH the customer pressing "A" go to the first name and then he need to use the arrow key to go the next "A" name because the key seek doen't run anymore (and the names could also are not in alphabetic order). Hope I am explained the problem, however I can send you a self-contained sample linked with the new and with the old combobox class to show you the difference. Marco
Combobox incremental seek bug
Marco, Yes, you are right, it behaves in a different way. Several customers requested this new behavior to perform incremental search. You may use the Class TComboBox from the previous FWH build.
Combobox incremental seek bug
[quote="Antonio Linares":1avw6ekv]You may use the Class TComboBox from the previous FWH build.[/quote:1avw6ekv] Antonio, I have insert any modification for incremental or previous use. If insert the new clause INCREMENTAL the incremental search is active without new clause the Combobox search is the previous version. Modify this: in fivewin.ch: [code:1avw6ekv]#xcommand @ <nRow>, <nCol> COMBOBOX &#91; <oCbx> VAR &#93; <cVar> ; &#91; <it&#58; PROMPTS, ITEMS> <aItems> &#93; ; &#91; SIZE <nWidth>, <nHeight> &#93; ; &#91; <dlg&#58;OF,WINDOW,DIALOG> <oWnd> &#93; ; &#91; <help&#58;HELPID, HELP ID> <nHelpId> &#93; ; &#91; ON CHANGE <uChange> &#93; ; &#91; VALID <uValid> &#93; ; &#91; <color&#58; COLOR,COLORS> <nClrText> &#91;,<nClrBack>&#93; &#93; ; &#91; <pixel&#58; PIXEL> &#93; ; &#91; FONT <oFont> &#93; ; &#91; <update&#58; UPDATE> &#93; ; &#91; MESSAGE <cMsg> &#93; ; &#91; WHEN <uWhen> &#93; ; &#91; <design&#58; DESIGN> &#93; ; &#91; BITMAPS <acBitmaps> &#93; ; &#91; ON DRAWITEM <uBmpSelect> &#93; ; &#91; STYLE <nStyle> &#93; ; &#91; <pict&#58; PICT, PICTURE> <cPicture> &#93;; &#91; ON EDIT CHANGE <uEChange> &#93; ; &#91; <search&#58; INCREMENTAL, SEARCH, INCR_SEARCH> &#93; ; => ; &#91; <oCbx> &#58;= &#93; TComboBox&#40;&#41;&#58;New&#40; <nRow>, <nCol>, bSETGET&#40;<cVar>&#41;,; <aItems>, <nWidth>, <nHeight>, <oWnd>, <nHelpId>,; &#91;&#123;|Self|<uChange>&#125;&#93;, <&#123;uValid&#125;>, <nClrText>, <nClrBack>,; <&#46;pixel&#46;>, <oFont>, <cMsg>, <&#46;update&#46;>, <&#123;uWhen&#125;>,; <&#46;design&#46;>, <acBitmaps>, &#91;&#123;|nItem|<uBmpSelect>&#125;&#93;, <nStyle>,; <cPicture>, &#91;<&#123;uEChange&#125;>&#93;, &#91;<&#46;search&#46;>&#93; &#41; #xcommand REDEFINE COMBOBOX &#91; <oCbx> VAR &#93; <cVar> ; &#91; <items&#58; PROMPTS, ITEMS> <aItems> &#93; ; &#91; ID <nId> &#93; ; &#91; <dlg&#58;OF,WINDOW,DIALOG> <oWnd> &#93; ; &#91; <help&#58;HELPID, HELP ID> <nHelpId> &#93; ; &#91; ON CHANGE <uChange> &#93; ; &#91; VALID <uValid> &#93; ; &#91; <color&#58; COLOR,COLORS> <nClrText> &#91;,<nClrBack>&#93; &#93; ; &#91; <update&#58; UPDATE> &#93; ; &#91; MESSAGE <cMsg> &#93; ; &#91; WHEN <uWhen> &#93; ; &#91; BITMAPS <acBitmaps> &#93; ; &#91; ON DRAWITEM <uBmpSelect> &#93; ; &#91; STYLE <nStyle> &#93; ; &#91; <pict&#58; PICT, PICTURE> <cPicture> &#93;; &#91; ON EDIT CHANGE <uEChange> &#93; ; &#91; <search&#58; INCREMENTAL, SEARCH, INCR_SEARCH> &#93; ; => ; &#91; <oCbx> &#58;= &#93; TComboBox&#40;&#41;&#58;ReDefine&#40; <nId>, bSETGET&#40;<cVar>&#41;,; <aItems>, <oWnd>, <nHelpId>, <&#123;uValid&#125;>, &#91;&#123;|Self|<uChange>&#125;&#93;,; <nClrText>, <nClrBack>, <cMsg>, <&#46;update&#46;>, <&#123;uWhen&#125;>,; <acBitmaps>, &#91;&#123;|nItem|<uBmpSelect>&#125;&#93;, <nStyle>, <cPicture>,; &#91;<&#123;uEChange&#125;>&#93;, &#91;<&#46;search&#46;>&#93; &#41; [/code:1avw6ekv] in Combobox.prg [code:1avw6ekv]// at the top #define MY_INCREMENTAL_SEARCH &#46;F&#46; &#46;&#46;&#46; CLASS TComboBox FROM TControl &#46;&#46;&#46; DATA lIncrSearch &#46;&#46;&#46; METHOD New&#40; nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId,; bChange, bValid, nClrFore, nClrBack, lPixel, oFont,; cMsg, lUpdate, bWhen, lDesign, acBitmaps, bDrawItem, nStyle,; cPict, bEChange, lIncSearch &#41; CLASS TComboBox &#46;&#46;&#46; DEFAULT &#46;&#46;&#46;,; lIncSearch &#58;= MY_INCREMENTAL_SEARCH &#46;&#46;&#46; &#58;&#58;lIncrSearch &#58;= lIncSearch &#46;&#46;&#46; METHOD ReDefine&#40; nId, bSetGet, aItems, oWnd, nHelpId, bValid, ; bChange, nClrFore, nClrBack, cMsg, lUpdate, ; bWhen, acBitmaps, bDrawItem, nStyle, cPict, ; bEChange, lIncSearch &#41; CLASS TComboBox &#46;&#46;&#46; DEFAULT &#46;&#46;&#46;,; lIncSearch &#58;= MY_INCREMENTAL_SEARCH &#46;&#46;&#46; &#58;&#58;lIncrSearch &#58;= lIncSearch &#46;&#46;&#46; METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TComboBox &#46;&#46;&#46; IF &#58;&#58;lIncrSearch // Incremental search // Actual code 70x version else // previous method Return Super&#58;KeyChar&#40; nKey, nFlags &#41; endif Return Nil[/code:1avw6ekv] if you want i send to your private mail the source.
Combobox incremental seek bug
Marco, Antonio Fabio Andrea Marco Alfonso .. .. Alexandro I don't think this is a very good design. Potentially, the user could have to type a lot more keystrokes to find what they are looking for. What if there are 50 items beginning with A. They might have to type A, 50 times. However, you can usually find what you want with an incremenal search with 3 or 4 keystrokes even in large lists. Most users are also going to expect lists to be sorted. Is there a reason you can't use a sorted list? James
Combobox incremental seek bug
Hi James, I created an unsorted list only for this sample for a better explain of this problem. In my commercial apps I obviusly use combos with sorted arrays. The problem of this new kind of incremental seek is that it is a programmer-like feature and not an end-user feature. Unfortunately I could have a human-monkey meeting point customers but really I have had a lot of call of customers with many difficult to scroll the combos list with this solution. There is also the problem that if the customer doesn't remember well the name it want to search then it need to continue the search with the mouse or arrows key. With the old system it has only to press the initial key and (in my apps) it can also make list filters pressing a button. Best Regars, Marco
Combobox incremental seek bug
Marco, >The problem of this new kind of incremental seek is that it is a programmer-like feature and not an end-user feature. Unfortunately I could have a human-monkey meeting point customers but really I have had a lot of call of customers with many difficult to scroll the combos list with this solution. I have not heard any complaints. Do you suppose this is just because the behavior changed and they were not used to it? I find that this will happen no matter great of an improvement you make, but after a few weeks they get used to it and you never hear about it again. >There is also the problem that if the customer doesn't remember well the name it want to search then it need to continue the search with the mouse or arrows key. With the old system it has only to press the initial key and (in my apps) it can also make list filters pressing a button. In contrast, if they do know the name, then they are going to have to type a lot more keystrokes. If you are looking for a name, Stevens, and there are a hundred names starting with S in the list, and given that T is about 3/4 of the way through the alphabet, with the old system they would have to type S about 75 times. With the new system, they could get to the first occurance of Stevens probably with only two keystrokes-ST. That is a big difference. I just tried an example with only about 200 names in the list and nine starting with S and one Stevens. It takes 2 keystrokes to get to Stevens using incremental searching and 7 with the old system. Still much less work with incremental searching. If your app supports user configuration, then you could allow each user to configure this particular behavior to the way they like it. That solves it nicely. James
Combobox lChanged problems
Hi all, I'm moving now from FWH Nov 2010 to FWH Dec 2012 and I'm dealing with the issues related. The most important issue is related to the lChanged clause on the combobox class because with FWH Dec 2012 it is evaluated more times when the control is initialized and this generate errors in my app usually when a dialogs with many comboboxes are used with the ON CHANGE clause is initialized. I checked the whatsnew readme and it reports a changes about lChanged in combobox but also that the changes should be disactivated for compatibility with the previous FWH releases. Any solution ? A self contained sample that show how many times the ON CHANGE clause is wrongly called is available on <!-- m --><a class="postlink" href="http://109.228.12.120/softwaredistribution/beta/send.zip">http://109.228.12.120/softwaredistribut ... a/send.zip</a><!-- m --> . Press also the button "Change data" that change the controls on folder to see the problem. Thanks
Combobox lChanged problems
Hello, Did you try with revised build published yesterday?. I though it was fixed in revised build.
Combobox lChanged problems
Yes, it has been fixed. Thanks for the info.
Combobox más grande
Muy buenas, me gustaría saber como puedo a la hora de elegir y expandir el combobox, hacer que se vean más elementos en el combobox con solo hacer click en la flecha. Gracias.
Combobox no Cambia
Saludos a Todos, amigos foristas. Nuevamente acudo a Uds. en busca de ayuda. Tengo esta situacion usando dos Combobox dentro de un TFolderEx en el primer combo, al seleccionar cualquier elemento, se ejecuta bien el [b:3m8xmjsl]On Change[/b:3m8xmjsl]... esa es la idea. Aqui no hay problema. no asi el segundo combo, el cual ejecuta On Change [b:3m8xmjsl]SOLO[/b:3m8xmjsl] cuando selecciono del segundo valor del array en adelante... Me explico de otra manera.. valores del primer combo aArray1:= { "Var1_1", "Var1_2", "Var1_3" ) valores del segundo combo aArray2:= { "Var2_1", "Var2_2", "Var2_3" ) al seleccionar en el combo uno, bien sea "Var1_1" , "Var1_2" o "Var1_3" se ejecuta ON CHANGE. Todo Bien al seleccionar en el combo dos , el primer elemento, en este caso [b:3m8xmjsl]"Var2_1"[/b:3m8xmjsl] NO se ejecuta ON CHANGE, puedo seleccionarlo mil veces y no ocurre nada mientras que si selecciono "Var2_2", "Var2_3" ON CHANGE se ejecuta perfectamente... Redefine ComboBox oCbxPresenta Var cCbxPresenta items aArreglo_Presenta Id 4001 of oFolder:aDialogs[2] on Change ( Fnct_ChangePresenta() ) Redefine ComboBox oCbxColores Var cCbxColor items aArreglo_Colores Id 4002 of oFolder:aDialogs[2] on Change ( Fnct_ChangeColores () ) de hecho, haciendo la siguiente prueba, Redefine ComboBox oCbxPresenta Var cCbxPresenta items aArreglo_Presenta Id 4001 of oFolder:aDialogs[2] on Change (msginfo('Hola 1') ,Fnct_ChangePresenta() ) Redefine ComboBox oCbxColores Var cCbxColor items aArreglo_Colores Id 4002 of oFolder:aDialogs[2] on Change ( msginfo('Hola 2') , Fnct_ChangeColores() ) Puedo Ver HOLA 1 siempre, pero HOLA DOS solo cuando seleccione un elemento diferente al primero. Una vez seleccionado cualquier elemento del 2do en adelante, SI se ejecuta el on change al seleccionar el primero. ambos combos se crean desde recursos .RC con Pelles C. tienen exactamente las mismas propiedades. Los Valores Iniciales de las variables de Captura de los combos , (cCbxPresenta y cCbxColor), tienen al inicio el valor de "Agregar" que NO esta dentro de los arreglos. Sin embargo, el primero funciona, el segundo no. Los combos Son estilo DropDown Alguna idea de que puede estar pasando? Fw17.01, PellesC, xHarbour, Borland 5.5
Combobox no Cambia
Muestre algo asi... [code=fw:39duqlh6]<div class="fw" id="{CB}" style="font-family: monospace;"><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> ARRITEM := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ICMS 00 - Tributada Integralmente"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 10 - Tributada com cobrança do ICMS por substituicao tributaria"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 20 - Com reducao da base de calculo"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 30 - Isenta ou nao tributada e com cobranca do ICMS por substituicao tributaria"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 40 - Isenta"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 41 - Não tributada"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 50 - Suspensao"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 51 - Diferimento"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 60 - Cobrado anteriormente por substituicao tributaria"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 70 - Com reducao da base de calculo e cobranca do ICMS por substituicao tributaria"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"ICMS 00 - Outras"</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> ARRITEM3 := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Margem Valor Agregado"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Pauta (valor)"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Preço Tabelado Max. (valor)"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Valor da Operacao"</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> MOSTRA01 <span style="color: #0000ff;">VAR</span> VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">19</span> <span style="color: #0000ff;">ITEMS</span> ARRITEM <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">WHEN</span> <span style="color: #000000;">&#40;</span> OPCAO = <span style="color: #ff0000;">"I"</span> .OR. OPCAO = <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> MOSTRA03 <span style="color: #0000ff;">VAR</span> VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">27</span> <span style="color: #0000ff;">ITEMS</span> ARRITEM3 <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">WHEN</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> OPCAO = <span style="color: #ff0000;">"I"</span> .OR. OPCAO = <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#41;</span> .AND. ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = ARRITEM<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .OR. VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = ARRITEM<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> &nbsp;.OR. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = ARRITEM<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> .OR. VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = ARRITEM<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span> .OR. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; VARPROTB<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = ARRITEM<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo1 <span style="color: #0000ff;">VAR</span> _Combo1 <span style="color: #0000ff;">ITEMS</span> cItemC1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> AZUL , FundoGet <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;oCombo1:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span>|| Valida_Combo1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oTipoVenda:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nKey| iif<span style="color: #000000;">&#40;</span> nKey = VK_RETURN, Valida_Combo1<span style="color: #000000;">&#40;</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: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo2 <span style="color: #0000ff;">VAR</span> _Combo2 <span style="color: #0000ff;">ITEMS</span> cItemC2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> AZUL , FundoGet <span style="color: #0000ff;">UPDATE</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Valida_Combo1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> codição <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cItemC2 := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jjj"</span>, <span style="color: #ff0000;">"kkk"</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; OItemC2:<span style="color: #000000;">Enable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; cItemC2 := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">''</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; cItemC2 := Disable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;oCombo2:<span style="color: #000000;">SetItems</span><span style="color: #000000;">&#40;</span> cItemC2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;_Combo2 := cItemC2<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;oCombo2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Valida_Combo1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> codição <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; cStaC2 := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xxx"</span>, <span style="color: #ff0000;">"zzz"</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; OstaC2:<span style="color: #000000;">Enable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;Ostarec:<span style="color: #000000;">SetItems</span><span style="color: #000000;">&#40;</span> cStaRec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;_starec := cStaRec<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;oStaRec:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:39duqlh6] Saludos.
Combobox no Cambia
Hola Karanha, saludos Creo entender en tu codigo, que los combox estan relacionados.. en mi caso no, el primer combo no tiene nada que ver con el comportamiento del segundo, ni el segundo con el primero.. son totalmente individuales.. no estan ralacionados.
Combobox no Cambia
Jose, como inicializas las variables cCbxPresenta y cCbxColor? Cuando pones en el combo 2 la opcion 2, luego pasas a el combo 1, y luego vuelves al combo 2 y cambias a opcion 1 no te ejecuta la accion?
Combobox no Cambia
Hola Cesar... saludos. las inicializo asi: cCbxPresenta:='Agregar' cCbxColor :='Agregar' incluso he tratado con : cCbxPresenta:=pad('Agregar',xx) cCbxColor :=pad('Agregar',xx) para igualar los tamaños. La situacion es esta: Ambos combos trabajan de manera totalmente indivivual. Ninguno tiene que ver con el otro. Solo hago referencia al combo 1 para indicar que con este todo esta bien, pero con el segundo que esta construido exactamente igual que el 1, no funciona el on change cuando inicialmente selecciono el primer valor. Me explico. Si en el combo2 selecciono el primer valor, no se ejecuta la accion. Si selecciono cualquier valor diferente al primero, se ejecuta. Incluso, dentro del mismo combo2 luego de seleccionar cualquier otro valor, vuelvo al primero, la accion se ejecuta. Es decir, Nunca se ejecuta ON CHANGE cuando "combo2 + valor 1" se realiza como primera accion sobre el objeto. Luego que selecciono un valor no sea el primero, todo funciona bien.. incluso con el primer valor del combobox Espero haberme explicado bien, si no es asi, dime y trato de plantearlo de otra manera mas explicita.,
Combobox no Cambia
Me alegro que lo hayas podido resolver! Saludos
Combobox no Cambia
Aca dejo un video donde se explica mejor. Como dije, el problema es en el segundo combo, el primero funciona perfecto y no tiene nada que ver ni hacer con el segundo, solo lo menciono para mostrar que trabaja bien y que asi deberia funcionar el segundo. [url:29pa0h5p]http&#58;//www&#46;datanet&#46;space/fw/error&#46;webm[/url:29pa0h5p]
Combobox no Cambia
Hola José: Según lo que entiendo, cuando en el combo dos tenes una opcion seleccionada distinta de la 1, y lo cambias a la opcion 1, ahi si te ejecuta la accion [quote:xtxjhpam] Incluso, dentro del mismo combo2 luego de seleccionar cualquier otro valor, vuelvo al primero, la accion se ejecuta. [/quote:xtxjhpam] Si es así, podría ser que el onchange no se ejecute porque al iniciar el dialogo tome como valor el primero de la lista. Prueba intentando también ejecutar la accion cuando el combo pierde el foco [code=fw:xtxjhpam]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCbxColores:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>||  Fnct_ChangeColores <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /> </div>[/code:xtxjhpam] Espero que te sea de utilidad
Combobox no Cambia
hola cesar.. gracias de nuevo por tu auyda Probe con el bLostFocus, igual falla, la accion se ejecuta dos veces. Por lo pronto resolvi de una manera la cual no queria aplicar, pero es la unica hasta el momento. inclui dentro del arreglo el elemento "agregar" y listo. Funciono. pero por logica "Agregar" aparece como opcion dentro de la lista desplegada por el combo. Eso Lo solucione con un return .f. en caso de que el usuario lo seleccione. Aun no veo que tengo de diferente entre el combo1 que funciona perfecto y el dos que falla... siendo el dos una copia exacta del uno... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Combobox no actualiza
Buenos dias Tengo el siguiente codigo: [code=fw:mhtz7t7n]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">&#40;</span>aAlias<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>Dbseek<span style="color: #000000;">&#40;</span>xnuconduc<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />cVar:=<span style="color: #000000;">&#40;</span>aAlias<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>->Matricula<br />cVar1:=<span style="color: #000000;">&#40;</span>aAlias<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>->Codigo+space<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"-"</span>+space<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>+<span style="color: #000000;">&#40;</span>aAlias<span style="color: #000000;">&#91;</span><span style="color: #000000;">26</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>->Nombre<br />cAlias1:=aAlias<span style="color: #000000;">&#91;</span><span style="color: #000000;">29</span><span style="color: #000000;">&#93;</span><br />titulopanta:=<span style="color: #ff0000;">" ENVIOS DEL DIA &nbsp; : &nbsp;"</span> + dtoc<span style="color: #000000;">&#40;</span>cini<span style="color: #000000;">&#41;</span> <br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">205</span> <br />&nbsp; &nbsp; oDlg:<span style="color: #000000;">cTitle</span>:=titulo<br />&nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">PROMPT</span> titulopanta <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">COLOR</span> nRGb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">251</span>, <span style="color: #000000;">151</span>, &nbsp;<span style="color: #000000;">71</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">Font</span> Publicas:<span style="color: #000000;">frosa</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Matricula"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">15</span> <span style="color: #B900B9;">//COLOR nRGb( 251, 151, &nbsp;71 ) Font Publicas:frosa </span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">330</span> &nbsp;<span style="color: #0000ff;">COMBOBOX</span> &nbsp;oCombo <span style="color: #0000ff;">VAR</span> &nbsp;cVar &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ITEMS</span> aItems&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK, &nbsp;nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">226</span>,<span style="color: #000000;">226</span>,<span style="color: #000000;">208</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Grabamatricula<span style="color: #000000;">&#40;</span>cVar,aAlias<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oCombo:<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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> &nbsp;<br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp;@ 8, 700 &nbsp; BTNBMP RESOURCE "Conecta" &nbsp;SIZE 70,15 OF oDlg NOBORDER LEFT PROMPT "Rescatar Impresos" ACTION ( Rescata(aAlias,cini), oBrw1:SetFocus() ) </span><br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;@ <span style="color: #000000;">17</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">PROMPT</span> titulopanta1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">380</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">COLOR</span> nRGb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">251</span>, <span style="color: #000000;">151</span>, &nbsp;<span style="color: #000000;">71</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">Font</span> Publicas:<span style="color: #000000;">frosa</span> <br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp;oSay:lTransparent := .t.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDlg:<span style="color: #000000;">cTooltip</span> := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Los Albaranes con Bultos y Kilos en Rojo"</span>+CRLF+<span style="color: #ff0000;">"Significa que estan ya impresos"</span>+CRLF+<span style="color: #ff0000;">"y no se van a imprimir"</span>,<span style="color: #ff0000;">"INFORMACION"</span><span style="color: #000000;">&#125;</span><br /><span style="color: #B900B9;">//-----------Primer browse</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">30</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">xbrowse</span> oBrw1 <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; <span style="color: #0000ff;">ALIAS</span> cAlias1;<br />&nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"Ruta"</span>,<span style="color: #ff0000;">"Nruta"</span>,<span style="color: #ff0000;">"Conductor"</span>,<span style="color: #ff0000;">"Nombre"</span>;<br />&nbsp; &nbsp; <span style="color: #0000ff;">AUTOCOLS</span> LINES CELL FOOTERS NOBORDER <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">175</span>,<span style="color: #000000;">-30</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> oBrw1:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span>|oCol|oCol:<span style="color: #000000;">lAllowSizing</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> oBrw1:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">oDataFont</span> := oFont2<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">"Sel"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || AScan<span style="color: #000000;">&#40;</span> oBrw1:<span style="color: #000000;">aSelected</span>, oBrw1:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> := EDIT_GET<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">nil</span>,.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oHeaderFont</span>:=oFont1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span>&nbsp; &nbsp; &nbsp;:= &nbsp;<span style="color: #000000;">20</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataStrAlign</span> := &nbsp;AL_CENTER<br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:oDataFont:=oFont3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oHeaderFont</span>:=oFont1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span>&nbsp; &nbsp; &nbsp;:= &nbsp;<span style="color: #000000;">90</span><br />&nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:oDataFont:=oFont2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oFooterFont</span>:= Publicas:<span style="color: #000000;">frosa</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bFooter</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">"SELECCION"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Num."</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span>&nbsp; &nbsp; &nbsp;:= &nbsp;<span style="color: #000000;">40</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oHeaderFont</span>:=oFont1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataStrAlign</span> := &nbsp;AL_CENTER<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oFooterFont</span>:= Publicas:<span style="color: #000000;">frosa</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bFooter</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || Len<span style="color: #000000;">&#40;</span> oBrw1:<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nFootStrAlign</span> := <span style="color: #000000;">1</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:oDataFont:=oFont3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Nombre"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidth</span>&nbsp; &nbsp; &nbsp;:= &nbsp;<span style="color: #000000;">95</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oHeaderFont</span>:=oFont1<br />&nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:oDataFont:=oFont2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; WITH OBJECT oBrw1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Ruta"</span> &nbsp; &nbsp; , &nbsp;<span style="color: #000000;">1</span>, &nbsp;<span style="color: #000000;">3</span>, ofont<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Conductor"</span>, &nbsp;<span style="color: #000000;">4</span>, &nbsp;<span style="color: #000000;">5</span>, ofont<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lColDividerComplete</span> := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">l2007</span> := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lRecordSelector</span> := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColHiding</span> := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColSwapping</span> := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> := &nbsp;STRETCHCOL_WIDEST<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrSel</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLUE, &nbsp;CLR_YELLOW <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHscroll</span>:=.F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">30</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nHeadStrAligns</span>:= AL_CENTER<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span>||cVar:=ponmatricula<span style="color: #000000;">&#40;</span>aAlias,oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">value</span><span style="color: #000000;">&#41;</span>,oCombo:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,xnuconduc:=oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">value</span>,aData2:=creaelarray2<span style="color: #000000;">&#40;</span>xnuconduc<span style="color: #000000;">&#41;</span>,aData3:=creaelarray3<span style="color: #000000;">&#40;</span>xnuconduc<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw2:<span style="color: #000000;">aArrayData</span>:=aData2,oBrw3:<span style="color: #000000;">aArrayData</span>:=aData3,oBrw1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBrw3:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oSay1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oSay2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,cVar1:=oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span>+space<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"-"</span>+space<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>+oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span>,oCombo1:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrStd</span>:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw1:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">242</span>,<span style="color: #000000;">247</span>,<span style="color: #000000;">252</span><span style="color: #000000;">&#41;</span>,nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">207</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">240</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROWMS <span style="color: #B900B9;">//6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; END WITH<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">500</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ruta"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">15</span> <span style="color: #B900B9;">//COLOR nRGb( 251, 151, &nbsp;71 ) Font Publicas:frosa </span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">530</span> <span style="color: #0000ff;">Say</span> oSay1 <span style="color: #0000ff;">PROMPT</span> oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">update</span><span style="color: #B900B9;">//COLOR nRGb( 251, 151, &nbsp;71 ) Font Publicas:frosa </span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">540</span> <span style="color: #0000ff;">Say</span> oSay2 <span style="color: #0000ff;">PROMPT</span> alltrim<span style="color: #000000;">&#40;</span>oBrw1:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">update</span><span style="color: #B900B9;">//COLOR nRGb( 251, 151, &nbsp;71 ) Font Publicas:frosa</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8</span>, <span style="color: #000000;">610</span> <span style="color: #0000ff;">COMBOBOX</span> &nbsp;oCombo1 <span style="color: #0000ff;">VAR</span> &nbsp;cVar1 &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ITEMS</span> aItems1&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">10</span> &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK, &nbsp;nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">226</span>,<span style="color: #000000;">226</span>,<span style="color: #000000;">208</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span> <br />&nbsp;</div>[/code:mhtz7t7n] y Cuando hago bChange en oBrw1, hace todo correctamente, actualiza los says etc, pero no consigo que me actualice el valor de cVar1 en el COMBOBOX
Combobox no actualiza
Estimado Jose Luis, Prueba con: oCombo1:Set( cVar1 ) despues de modificar cVar1
Combobox no actualiza
Correcto Gracias Antonio!
Combobox no se actualiza. Estoy perdido y me urge.
Hola tengo un Dialog en el cual existe un checkbox que al clicar en el , crear dos tablas , aunque la primera es la que sale en el combobox, pero cuando le pongo el setitems me da el siguiente error : Error description: Error BASE/1132 Error de rango: acceso al array Args: [ 1] = A { ... } [ 2] = N 0 Stack Calls =========== Called from: .\peticion.PRG => (b)PETREPORTE(0) Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:CHANGE(454) Called from: .\source\classes\COMBOBOX.PRG => (b)TCOMBOBOX(140) Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:RESET(0) Called from: .\source\classes\COMBOBOX.PRG => (b)TCOMBOBOX(153) Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:SETITEMS(0) Called from: .\peticion.PRG => (b)PETREPORTE(0) Called from: .\source\classes\CHECKBOX.PRG => TCHECKBOX:CLICK(142) Os adjunto tambien el codigo por si podeis echarme una mano porque estoy perdido . Muchas Gracias. [code=fw:2at7gng2]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />   tcomponente := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   tlcomponente := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   vvcomponente:=<span style="color: #000000;">1</span><br />   vlcomponente:=<span style="color: #ff0000;">"Todos"</span><br /><br />-.......................<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">checkbox</span> ovcorte <span style="color: #0000ff;">Var</span> vcorte  <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">oF</span> odimprimir <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">click</span> <span style="color: #000000;">&#40;</span>ponercomponente<span style="color: #000000;">&#40;</span>tcomponente,tlcomponente<span style="color: #000000;">&#41;</span>,ovvcomponente:<span style="color: #000000;">setItems</span><span style="color: #000000;">&#40;</span>tcomponente<span style="color: #000000;">&#41;</span>,ovvcomponente:<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 /><br />  <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> ovvcomponente <span style="color: #0000ff;">Var</span> vvcomponente <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span> <span style="color: #0000ff;">items</span> tcomponente <span style="color: #0000ff;">OF</span> odimprimir <span style="color: #0000ff;">when</span> vcorte;<br />           <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span>vlcomponente:=alltrim<span style="color: #000000;">&#40;</span>tlcomponente<span style="color: #000000;">&#91;</span>vvcomponente<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>,ovlcomponente:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">update</span><br /><br />  <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">get</span> ovlcomponente <span style="color: #0000ff;">Var</span> vlcomponente <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">of</span> odimprimir <span style="color: #0000ff;">when</span> lsay</div>[/code:2at7gng2] [code=fw:2at7gng2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ponercomponente<span style="color: #000000;">&#40;</span>tcomponente,tlcomponente<span style="color: #000000;">&#41;</span><br /><br />    asize<span style="color: #000000;">&#40;</span>tcomponente,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />    asize<span style="color: #000000;">&#40;</span>tlcomponente,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />    aadd<span style="color: #000000;">&#40;</span>tcomponente,<span style="color: #ff0000;">"Todos"</span><span style="color: #000000;">&#41;</span><br />    aadd<span style="color: #000000;">&#40;</span>tlcomponente,<span style="color: #ff0000;">"Todos"</span><span style="color: #000000;">&#41;</span><br /><br />    ccomponente := OpenDbf<span style="color: #000000;">&#40;</span>fcomponen,<span style="color: #000000;">1</span>, , , , kcomponen,<span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>DbSetOrder<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>-><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 />    accomponente:=<span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    vcomparar:=<span style="color: #ff0000;">""</span><br />    <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> !eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">if</span> vcomparar != <span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>->componente<br />          aadd<span style="color: #000000;">&#40;</span>tcomponente,<span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>->componente<span style="color: #000000;">&#41;</span><br />          aadd<span style="color: #000000;">&#40;</span>tlcomponente,<span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>->detalle<span style="color: #000000;">&#41;</span><br />*          aadd<span style="color: #000000;">&#40;</span>tcomponente,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>->componente,<span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>->detalle<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />          vcomparar := <span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>->componente<br />       <span style="color: #00C800;">endif</span><br />        dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">enddo</span><br />   <span style="color: #000000;">&#40;</span>ccomponente<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>dbclosearea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span>acpeticion<span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2at7gng2]
Combobox no se actualiza. Estoy perdido y me urge.
Prueba con: ON CHANGE (vlcomponente:=alltrim(tlcomponente[Max( vvcomponente, 1 )]),ovlcomponente:refresh()) update
Combobox no se actualiza. Estoy perdido y me urge.
Perfecto. Muchisimas Gracias, Maestro.
Combobox not change
The code below does not work: [code=fw:10yhaerl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> aQtdes, cQtde<br /><br /><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span><br /><br />aQtdes := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">"2"</span>, <span style="color: #ff0000;">"3"</span>, <span style="color: #ff0000;">"4"</span>, <span style="color: #ff0000;">"5"</span>, <span style="color: #ff0000;">"6"</span> <span style="color: #000000;">&#125;</span><br />cQtde := <span style="color: #ff0000;">"1"</span><br /><br />@ <span style="color: #000000;">13</span>,<span style="color: #000000;">98.5</span> <span style="color: #0000ff;">COMBOBOX</span> oCmbnQtde <span style="color: #0000ff;">VAR</span> cQtde <span style="color: #0000ff;">OF</span> oWndProdutos <span style="color: #0000ff;">ITEMS</span> aQtdes <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>,<span style="color: #000000;">75</span> <span style="color: #0000ff;">PIXEL</span> <br /><br /><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span><br /><br />MudarQtde<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> MudarQtde<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> oCmbnQtde:<span style="color: #000000;">nAt</span> := <span style="color: #000000;">2</span>         <span style="color: #B900B9;">// this does not work</span><br /> oCmbnQtde:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"2"</span><span style="color: #000000;">&#41;</span>   <span style="color: #B900B9;">//this does not work</span><br /> oCmbnQtde:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>        <span style="color: #B900B9;">// this does not work</span><br /> oCmbnQtde:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <br /><span style="color: #00C800;">RETURN</span> .T.<br /> </div>[/code:10yhaerl] Even if the style is changed (CBS_DROPDOWN, CBS_DROPDOWNLIST), still does not work. Best Regards, Fabio Souza
Combobox not change
Fabio, Are you using it from a window or from a dialog ?
Combobox not change
I'm using Dialog. I use TSBUTTON, but it does not work with Window. Thanks, Fabio Souza
Combobox not change
Fabio, Please build and test samples\combos.prg and check if it works for you, thanks
Combobox o dbcombo
Amigos: Tengo un array que contiene aHoras :={"H00_A1","H01_A2","H02_A3",....} Que debo usar combobox o dbcombo con el array y Hay alguna forma que me muestra solo los 00, 01, 02 y al seleccionar seleccione todo el string? Muchas gracias. Ruben Fernandez.
Combobox o dbcombo
Hola, puedes utilizar cualquiera pieso, un combo normal, puedes post procesar el resultado en On CHANGE y creo que tambien en el VALID, para que en funcion de tu seleccion tengas el resultado que esperas, por otra parte el DBCOMBO tambien te sirve, utilizando ITEMFIELD, LISTFIELD para los arreglos de visualizacion y resultado saludos Marcelo
Combobox o dbcombo
Creo que lo mas sencillo es con dbCombo. Algo parecido al siguiente código. [code:1iummj1n] REDEFINE DBCOMBO cHora ID 4001 OF oDlg ITEMS &#123;"H00_A1",H01_A2","H02_A3"&#125; PROMPTS &#123;"00","01","02"&#125; [/code:1iummj1n]
Combobox o dbcombo
Gracias a los 2 muy amables. Saludos. Ruben Fernandez.
Combobox on BTNBAR
Hi, In a application, I use BUTTONBAR with TBtnBmp() to add the buttons. Is it possible to add also a COMBOBOX on BUTTONBAR , or do I have to use another class? I would like to keep using the BUTTONBAR, because the customers are used the work with this...
Combobox on BTNBAR
Marc, Just check not to cover any buttons ( added to sample testbar.prg ) @ 2, [color=#FF0000:27ezvh5l]350[/color:27ezvh5l] COMBOBOX oCbx VAR cItem ITEMS { "Testing", "this", "ComboBox" } ; SIZE 100, 300 [color=#FF0000:27ezvh5l]OF oBar [/color:27ezvh5l] PIXEL HEIGHTGET 22 [img:27ezvh5l]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Combo2&#46;jpg[/img:27ezvh5l] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Combobox on BTNBAR
Thank you Uwe, I will try it.
Combobox on Folder (Gradient-background) ?
Hello, I have a Problem, showing a Combobox on a Folder-Gradient-Background using Function [color=#FF0000:37dvp9jn]Gradientbrush[/color:37dvp9jn] ( needed for Gradient-painting on Folders ). Normal Brush and Image works. To define a Background-color, I tested : oCbx:nClrText := 0 // Black oCbx:nClrPane := 16777215 // White Background and oCbx:SetColor( 0, 16777215 ) but does not work ( the Combobox is painted transparent ). [img:37dvp9jn]http&#58;//www&#46;pflegeplus&#46;com/pictures/combobox&#46;jpg[/img:37dvp9jn] [img:37dvp9jn]http&#58;//www&#46;pflegeplus&#46;com/pictures/combobox1&#46;jpg[/img:37dvp9jn] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Combobox on multidimensional array
Hi all, I have a multidimensional array like: aArray:=array(0,2) aadd(1,"Marc") aadd(2,"Luca") aadd(3,"Jannette") aadd(4,"Francis") and I would make a combobox with only the second element list (the names). Is there a quick way to make this directly into the REDEFINE COMBOBOX command line ? Thank you in advance
Combobox on multidimensional array
Marco, [code=fw:3phzftbp]<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> aArray := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, cName := <span style="color: #ff0000;">"Marc"</span><br /><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Marc"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"Luca"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"Jannette"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aArray, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">4</span>, <span style="color: #ff0000;">"Francis"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">COMBOBOX</span> cName <span style="color: #0000ff;">ITEMS</span> ArrTranspose<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</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></div>[/code:3phzftbp]
Combobox on multidimensional array
Hi Antonio, it runs. Thank you. I have just a problem trying to use the ArrTranspose() into the command syntax, essentially I have to replace the <aItems> with ArrTranspose(<aItems>)[2] but it doesn't runs, sure for a syntax problem. Any ideas ? Thank you. #xcommand REDEFINE COMBOLIST [ <oCbx> VAR ] <cVar> ; [ <items: PROMPTS, ITEMS> <aItems> ] ; [ ID <nId> ] ; [ <dlg:OF,WINDOW,DIALOG> <oWnd> ] ; [ <help:HELPID, HELP ID> <nHelpId> ] ; [ ON CHANGE <uChange> ] ; [ VALID <uValid> ] ; [ <color: COLOR,COLORS> <nClrText> [,<nClrBack>] ] ; [ <update: UPDATE> ] ; [ MESSAGE <cMsg> ] ; [ WHEN <uWhen> ] ; [ BITMAPS <acBitmaps> ] ; [ ON DRAWITEM <uBmpSelect> ] ; [ STYLE <nStyle> ] ; [ <pict: PICT, PICTURE> <cPicture> ]; [ ON EDIT CHANGE <uEChange> ] ; => ; [ <oCbx> := ] TComboBox():ReDefine( <nId>, bSETGET(<cVar>),; ArrTranspose(<aItems>)[2], <oWnd>, <nHelpId>, <{uValid}>, [{|Self|<uChange>}],; <nClrText>, <nClrBack>, <cMsg>, <.update.>, <{uWhen}>,; <acBitmaps>, [{|nItem|<uBmpSelect>}], <nStyle>, <cPicture>,; [<{uEChange}>] )
Combobox on multidimensional array
Marco, Please try this: ArrTranspose(<aItems>)\[2\]
Combobox on multidimensional array
Great !! Thank you Antonio.
Combobox on multidimensional array
Marco I think the solution is: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25496&start=0&hilit=arrtranspose">viewtopic.php?f=3&t=25496&start=0&hilit=arrtranspose</a><!-- l --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Sorry, It's a joke
Combobox open and ESC
Hi, when combo is open and I press Escape dialog closes.I expect that only combo closesAny ideasThanksmarco #include "Fivewin.ch"FUNCTION MAIN()LOCAL oDlgLOCAL oComboLOCAL cVariab := SPACE( 10 )DEFINE DIALOG oDlg@ 1, 1 COMBOBOX oCombo VAR cVariab ITEMS { "AAAAAA", "BBBBBB", "CCCCCC", "DDDDDD", "EEEEEE" }ACTIVATE DIALOG oDlg CENTER? "Dialog closed"RETURN NIL
Combobox open and ESC
Hola amigo...Prueba con un VALID en el ACTIVATE del DIALOG.Espero te sirva. Saludos desde Argentina, Esteban.
Combobox open and ESC
Marco,I think that this may be a bug in TCombobox as other apps do close the combobox, not the dialog.You can try adding this to the KeyChar() method: if nKey == VK_ESCAPE ::close() return 0 endifI'm am not sure if you need to call the ::close() or ::closeUp() method so try both.Let us know what you find.Regards,James
Combobox open and ESC
James, no goodI've tried but ....nothing <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> thanks
Combobox open and ESC
I didn't test it, but this might be a solution ?[code:1ht3dofg]FUNCTION MAIN&#40;&#41; LOCAL oDlg LOCAL oCombo LOCAL cVariab &#58;= SPACE&#40; 10 &#41; LOCAL CbRet &#58;= &#46;T&#46; DEFINE DIALOG oDlg @ 1, 1 COMBOBOX oCombo VAR cVariab ITEMS &#123; "AAAAAA", "BBBBBB", "CCCCCC", "DDDDDD", "EEEEEE" &#125; oCombo&#58;bGotFocus &#58;= &#123; || CbRet &#58;= &#46;F&#46; &#125; oCombo&#58;bLostFocus &#58;= &#123; || CbRet &#58;= &#46;T&#46; &#125; ACTIVATE DIALOG oDlg CENTER VALID CbRet ? "Dialog closed" RETURN NIL[/code:1ht3dofg]Let us know if it works.
Combobox open and ESC
Meanwhile I did the test myself but I noticed that I couldn't open the combobox anymore.But if I click on the combobox (unfortunately without opening), pushing the Escape-key doesn't end the dialog box anymore. After having clicked on another field, the dialog box does end again if I push the Escape-key.So looking for a solution in this direction might be the right one.Good luck.
Combobox open and ESC
Marco:Try this way[code:56ewy7x6] ACTIVATE DIALOG oDlg CENTER VALID ! GetASyncKey&#40;VK_ESCAPE&#41; [/code:56ewy7x6]Regards
Combobox open and ESC
Armando,The problem is that the first time you press Esc the combobox should close, and then if you press Esc again, the dialog should close. Your VALID clause will prevent the dialog from closing when pressing Esc.I did some testing and the combobox is getting closed, but then the dialog is also closed. So, I now think the problem is in the TDialog:KeyChar() method.James
Combobox open and ESC
Marco,From FWH 8.08 you can do:...[b:2p4vhfi3]SetDialogEsc( .F. )[/b:2p4vhfi3]DEFINE DIALOG oDlg ...
Combobox open and ESC
OK, I have found the solution. Add this line to the method definitions in TCombobox. METHOD KeyDown inline ::close(), 1Antonio, will you add this to the FW source?Regards,James
Combobox open and ESC
James,That code would not process any KeyDown received msgs. We could try with:[code:26kj64k8] METHOD KeyDown&#40; nKey, nFlags &#41; CLASS TComboBox if nKey == VK_ESC &#58;&#58;Close&#40;&#41; return 1 endif return Super&#58;KeyDown&#40; nKey, nFlags &#41; [/code:26kj64k8]
Combobox open and ESC
Antonio,Of course. I didn't think it through.I tried your solution and it seems to be working. The incremental search is working as are the up and down arrows, home, end, pg dn, and pg up keys.You do need to change VK_ESC to VK_ESCAPE.James
Combobox open and ESC
Great!EMG
Combobox open and ESC
James,Already implemented for next FWH build.Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Combobox open and ESC
I'm shocked <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> about how many [size=150:6sh71760]beautiful minds [/size:6sh71760] <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: -->in this forum!!!! <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> dear friends thanks to all
Combobox over-ride ITEM array of values
To All I am trying to figure out how to use a combobox from resources that will allow me to insert a value other than the array values defined by the ITEM parameter. [code=fw:2rpu9rd0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCity &nbsp;<span style="color: #0000ff;">var</span> cCity &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">157</span> <span style="color: #0000ff;">of</span> oCust ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Columbia &nbsp; &nbsp;"</span>,<span style="color: #ff0000;">"Irmo &nbsp; &nbsp; &nbsp; &nbsp;"</span>,<span style="color: #ff0000;">"Lexington &nbsp; "</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:2rpu9rd0] As in the above ... If I live in "Pittsburg" and the ITEM array does not have that value .. I want to be able to type that in as cCity and save that to the database. Since "Pittsburg" is not an element in the ITEM array .. I do not get the chance to over-ride the array values. Any Ideas ? Thanks Rick Lipkin
Combobox over-ride ITEM array of values
[code=fw:2baixvds]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCity  <span style="color: #0000ff;">var</span> cCity   <span style="color: #0000ff;">ID</span> <span style="color: #000000;">157</span> <span style="color: #0000ff;">of</span> oCust ;<br />         <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Columbia    "</span>,<span style="color: #ff0000;">"Irmo        "</span>,<span style="color: #ff0000;">"Lexington   "</span> <span style="color: #000000;">&#125;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN<br /> </div>[/code:2baixvds] EMG
Combobox over-ride ITEM array of values
Enrico .. Thank you ! Rick
Combobox para llenar DBf
Buenas tardes, Alguno de ustedes me podria ayudar con esto: Necesito llenar un campo de una Dbf desde un Combobox. Ya intente usar el DBCombo pero debo crear una DBf para sus valores. La idea es cargar los valores del Combobox desde un array y tambien que permita visualizar el registro ya cargado al momento de modificar. Atento a sus comentarios
Combobox para llenar DBf
local aMeses := {"Enero", "Febrero", "Marzo", ...}, oCbx, cMes := "" REDEFINE COMBOBOX oCbx VAR cMes ITEMS aMeses ID ID_MES OF oDlg ... if lSave ARCHIVO->CAMPO := cMes
Combobox para llenar DBf
MIl gracias!!!
Combobox para llenar DBf
Compuin; Si entiendo tu consulta, lo hago así: [code=fw:893wgsky]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">REDEFINE</span> DBCOMBO aO<span style="color: #000000;">&#91;</span>_CmbM2<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cIDDoc <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> aO<span style="color: #000000;">&#91;</span>_DlgM<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">UPDATE</span> ;<br />            <span style="color: #0000ff;">ALIAS</span>     ::<span style="color: #000000;">oDbTDoc</span>:<span style="color: #000000;">cAlias</span> ;<br />            ITEMFIELD <span style="color: #ff0000;">"FDOC01"</span>         ;<br />            LISTFIELD <span style="color: #ff0000;">"FDOC02"</span>         ;<br />            <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ...<br /><br /><span style="color: #B900B9;">// Boton para agregar registros a la DBF que muestra el DBcombo</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> aO<span style="color: #000000;">&#91;</span>_BtDocs<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">520</span> <span style="color: #0000ff;">OF</span> aO<span style="color: #000000;">&#91;</span>_DlgM<span style="color: #000000;">&#93;</span> NOBORDER ;<br />            <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"bmp_AbreTb1"</span>  ;<br />            TOOLTIP  <span style="color: #ff0000;">"Abre Tabla Tipo de Documentos"</span> ;<br />            <span style="color: #0000ff;">ACTION</span>   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> !Empty<span style="color: #000000;">&#40;</span> cDescAdic:= oSelf:<span style="color: #000000;">TbAdicionales</span><span style="color: #000000;">&#40;</span> _TBDOCTIPO <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, aO<span style="color: #000000;">&#91;</span>_CmbM2<span style="color: #000000;">&#93;</span>:<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: #B900B9;">// Aca llamo a una rutina con un Browse q despliega las descripciones mostradas en el DBCombo</span><br /><span style="color: #B900B9;">// Luego, con los botones "Agrega/Edita", de esta rutina, habro un Dlg donde agrego/edito, segun la necesidad, a la DBF.</span><br /><span style="color: #B900B9;">// Al volver actualizo el DBCombo con aO[_CmbM2]:Update() y aO[_CmbM2]:Refresh()</span><br /> </div>[/code:893wgsky] y se vé así: [img:893wgsky]http&#58;//img525&#46;imageshack&#46;us/img525/3143/screen1xa&#46;jpg[/img:893wgsky]
Combobox para llenar DBf
Gracias MarioG,
Combobox para llenar DBf
Hola. Vamos, a ver, en un entorno de tablas, el uso de dbCombo sólo es comprensible siempre y cuando mantengas un número pequeño de registros. ¿Por qué? Porque te los carga en un array. Si tengo 10 ó 20 registros en la tabla, pues bien, pero cuando tienes 800, 1000 o 5000 registros no es comprensible su uso. Además, siempre que añadas o elimines un registro debes borrar y recargar la tabla para que lo mostrado sea lo real. En definitiva, si tienes que darle al usuario la opción a elegir, te creas una ventana con un browse de la tabla y santas pascuas. Otra cosa que echo en falta es el uso de la notación húngara en los nombres de variables, funciones, etc. Un saludo, Fernando
Combobox para llenar DBf
En el caso que me presentas el combobox agrega al campo de la dbf el valor del array (Seria la rutina de Incluir) . Como puedo cargar desde el dbf al combobox para actualizar?
Combobox para llenar DBf
Hola para eso deberas modificar la Clase dbCombo [code=fw:1fwd1ptg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> DBCOMBO aGet<span style="color: #000000;">&#91;</span>id_tipot<span style="color: #000000;">&#93;</span>                                                ;<br />        <span style="color: #0000ff;">VAR</span> _tipot                                                                              ;<br />        <span style="color: #0000ff;">ID</span> id_tipot <span style="color: #0000ff;">OF</span> PAGE1 <span style="color: #0000ff;">UPDATE</span>                                                     ;<br />        <span style="color: #0000ff;">COLOR</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span>                                              ;<br />        <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"TABLAS"</span>                                                                          ;<br />        ITEMFIELD <span style="color: #ff0000;">"COD_TABLA"</span>                                                               ;<br />        LISTFIELD <span style="color: #ff0000;">"NOM_TABLA"</span>                                                   ;<br />        CONDICION <span style="color: #000000;">&#40;</span> Tablas-><span style="color: #000000;">&#40;</span> OrdsetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NOMTABLA"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                        Tablas-><span style="color: #000000;">&#40;</span> OrdScope<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"OTE"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                        Tablas-><span style="color: #000000;">&#40;</span> OrdScope<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"OTE"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                        Tablas-><span style="color: #000000;">&#40;</span> AdsSetAof<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sucursal="</span>+str<span style="color: #000000;">&#40;</span>nSucursal,<span style="color: #000000;">1</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>;<br />        FINCONDICION <span style="color: #000000;">&#40;</span> Tablas-><span style="color: #000000;">&#40;</span> OrdScope<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                        Tablas-><span style="color: #000000;">&#40;</span> OrdScope<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Tablas-><span style="color: #000000;">&#40;</span> AdsClearAof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                        Tablas-><span style="color: #000000;">&#40;</span> OrdsetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TIPTABLA"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>                        <span style="color: #000000;">&#41;</span>  ;<br />        <span style="color: #00C800;">FOR</span> Tablas->Nom_Tabla = <span style="color: #ff0000;">"Neumaticos"</span>;<br />        NOBLANK<br /> </div>[/code:1fwd1ptg] si quieres actualizar el dbCombo, solo haces aGet[id_ot]:Update() y te refresca el combo con los datos actualizados
Combobox problem
I have a combobox working OK The next one in a different Dialog will not show its Array after clicking on it. First example: Function Minpunten(cAlias, oDlwBew ) Local oDlp, oRadmenu, oCbx Local MyArrMinJn := {"J","N"} Local oMyComb DEFINE DIALOG oDlp RESOURCE "Minpunten" REDEFINE COMBOBOX oMyComb VAR cMinjn Items MyArrMinJn ID 101 OF oDlp ACTIVATE DIALOG oDlp Second example: Function AnderDomein( cDomein ) Local oDlg, oRadmenu, oCbx Local MyArrDom := {"A","C"} Local oMyComb DEFINE DIALOG oDlg RESOURCE "Domeinen" REDEFINE COMBOBOX oMyComb VAR cDomeinX Items MyArrDom ID 104 OF oDlg ACTIVATE DIALOG oDlg I don't see the difference, but the second one will not show its Array and consequently I cannot select an Item. Any suggestion? Thanks, Jules de Pierre
Combobox problem
Is the combo tall enough? Check also what really is in the array. EMG
Combobox problem
Dear Enrico, That's it. I did not paint the Combobox tall enough in the Workshop. Thank you. Jules
Combobox problem
In the sample program combos.prg when I press the enter key the dialog is closed. Regards Pier Luigi