topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Combo box incremental search | In the resources you use: CBS_DROPDOWNLIST and in the PRG you don't need any.
Please run FWH\samples\combos.prg. The one on the right is the right one <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
You can review combos.rc to see how it is declared, thanks |
Combo box incremental search | The problem is that we need to be able to add an entry not on the list ...
People like to just type in values sometimes ( or always ).
That, by definition, is the combobox vs the drop down list.
Tim |
Combo box with data object | The following code:
REDEFINE COMBOBOX oMake VAR cvMake ITEMS aMake ;
ON CHANGE ( aModel := SetVehModel( aModel, cvMake ), oModel:setItems( aModel ), oDvm:update( ), .T. );
ID 893 OF oDvm MESSAGE "Enter the make of the vehicle" UPDATE
REDEFINE COMBOBOX oModel VAR oUnt:vehmod ITEMS aModel ;
ID 442 OF oDvm MESSAGE "Select the proper model" UPDATE
now has a problem. The idea is when a make is selected in the first combobox, the array of models specific to that make is reset. That all works fine. However, the variable from the database, oUnt:vehmod, does not display. Essentially, browsing dow a file should display both the make and model in the dialog box, but only the make is shown. This is a relatively new behavior ( latest FWH update ). If I remove the oModel VAR it will show but then the aModel array does not get updated properly.
Your ideas would be appreciated. |
Combo box with data object | Tim,
I suggest comparing the combobox classes from the two versions using a file compare utility. This should help you find the changes and thus narrow down the problem.
I use WinMerge (<!-- w --><a class="postlink" href="http://www.winmerge.org">www.winmerge.org</a><!-- w -->). It is freeware.
James |
Combo box with data object | The error was unrelated to the combobox code. On the On Change, it had to do with the sequence the data was applied. When I changed the sequence of the steps in the process it worked. I'm not exactly sure why because logically the original order seemed correct, but it works now. |
Combo box with data object | Tim,
OK, glad to hear you have solved it.
James |
Combo en 3D | Hola amigos,
Estoy empezando a utilizar los combobox... y me surge un problema y es que me los saca con el tema del winxp cuando yo los quiero sin "temar" porque utilizo los controles con apariencia 3D tipo Win 95.
Tengo un poco de lio con las funciones Set3DLook() y SetWin95Lok()...
El combo tampoco tiene clausula 3D...
Se que navego un poco contracorriente pq los 3D tipo Win95 no es lo "current" pero en fin...
Por favor, cualquier ayuda ser muy bien venida...
PD. Revisando la clase TGet(), no llego a comprender porque ella si sale en 3D y el combo no... cosas de la ignorancia |
Combo en listbox | AntonioUn saludo para ti y la gente del foroAntonio la cuestion es como se pone un combobox en un campo de un listbox es eso posible?De antemano AntonioGraciasCordialmeteJairo Barbosa |
Combo en listbox | Jairo,Te refieres a un browse ó a un listbox ?Si te refieres a un browse, la clase TXBrowse te proporciona el usar comboboxes directamente.Si se trata de un listbox, piensa que puedes crear cualquier control "encima" de él:@ ..., ... COMBOBOX ... OF oListBox |
Combo en listbox | [quote="Antonio Linares":1sd2cx9a]Jairo,
Te refieres a un browse ó a un listbox ?
Si te refieres a un browse, la clase TXBrowse te proporciona el usar comboboxes directamente.
Si se trata de un listbox, piensa que puedes crear cualquier control "encima" de él:
@ ..., ... COMBOBOX ... OF oListBox[/quote:1sd2cx9a]//************************************************AntonioSi que funciona disculpa mi falta de reflexionCordialmenteJairo Babosa |
Combo o DBCOMBO con Record set | Amigos:
Alguien que tenga un pequeño ejemplo de un COMBO o DBCOMBO usando record set y
quiera compartimelo, será agradecido.
Saludos |
ComboBax vs Multi dimension array | Hi All,
Ihave a multi denmension array which have 4 elements and 5 fields.
I want to display and select any of the 4 elements but only on field 2.
How can I achive this ? <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
Regards,
Gilbert |
ComboBax vs Multi dimension array | Gilbert,
You may review samples\TestArr2.prg.
Please register on this forum, thanks. |
ComboBax vs Multi dimension array | Hi Antonio,
Thanks for your answer, but I think you didn`t understand my question.
Browsing an array is not causing me any problem for now.
What I want to do is use a COMBOBOX and combine two fields for selection in the drop down list. TestArr2.prg demonstrated how to browse multi dimension array. <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Regards,
Gilbert |
ComboBax vs Multi dimension array | Gilbert,
may be this could help you.
Best regards,
Detlef
[code:3tyco3ly]#include "fivewin.ch"
///////////////
FUNCTION Main()
///////////////
LOCAL oDlg, oCbx
LOCAL aSmall := {}
LOCAL cVar := ""
LOCAL aBig := {;
{ "Element 1, 1", "Element 1, 2", "Element 1, 3", "Element 1, 4", "Element 1, 5" },;
{ "Element 2, 1", "Element 2, 2", "Element 2, 3", "Element 2, 4", "Element 2, 5" },;
{ "Element 3, 1", "Element 3, 2", "Element 3, 3", "Element 3, 4", "Element 3, 5" },;
{ "Element 4, 1", "Element 4, 2", "Element 4, 3", "Element 4, 4", "Element 4, 5" } ;
}
aEval( aBig, { |a| aadd( aSmall, a[ 2 ] ) } )
cVar := aSmall[ 1 ]
DEFINE DIALOG oDlg
@ 10, 10 COMBOBOX oCbx;
VAR cVar;
ITEMS aSmall;
SIZE 60, 150;
PIXEL;
OF oDlg
ACTIVATE DIALOG oDlg
RETURN( NIL )
[/code:3tyco3ly] |
ComboBax vs Multi dimension array | Hi Detlef,
Thanks for your suggestion. That`s exactly the technique I`m using right now, but I don`t like it. I was thinking of eliminate the second array and work with the original array instead.
The original multi dimension array content has to change according to two other Get fields. Working with two array makes the code much more complex because I will need to update the orignal array wich in turn will be used to update the second array. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Regards, |
ComboBax vs Multi dimension array | Gilbert, I think you must do changes in TComboBox class to let this feature...
Regards,
Maurilio |
ComboBax vs Multi dimension array | Hello
This function you want?
[img:j0dxil8q]http://www.fivetech.com.tw/big5/demo_images/DrComBox2.jpg[/img:j0dxil8q]
[img:j0dxil8q]http://www.fivetech.com.tw/big5/demo_images/DrComBox.jpg[/img:j0dxil8q]
Regards,
Richard
Fivetech.net Taiwan |
ComboBox | Saludos.
Tengo el siguiente y aparente problema con combobox.
En mi archivo de RC anteriormente en las propiedades de algunos combobox's tenia marcada la opción de Sorted, ahora que desactivo esta opción ya al estar en ejecución mi aplicación aun me sigue ordenando los elementos.
A que puede deberse esto?
En espera de su ayuda reciban un cordial saludo.
Arturo. |
ComboBox | Arturo,
El array de items que le proporcionas desde código fuente, está ordenado ? |
ComboBox | Antonio,
El arreglo no va ordenado. todo sucedio cuando habilite la opción de Sorted en las propiedades del combobox desde el recurso, lo deshabilito y me lo sigue manteniendo ordenado.
Saludos |
ComboBox | Estas usando Pelles C o Workshop? Hasta donde lo sé Pelles C hace con que todos los combobox sean marcados como SORTED.
Saludos,
Kleyber |
ComboBox | Hola a todos:
Estoy tratando de hacer una cosa y no se como, me explico, tengo un ComboBox, tengo un sitio pequeño y la lista las opciones tienen textos anchos. Mi pregunta es la siguiente puedo definir un combobox de 75 pixel de ancho y cuando el usuario pinche en él aumente a 700 pixel.
Un saludo
Gracias anticipadas
Carlos |
ComboBox | [quote="colthop":1j3o3i23]Hola a todos:
Estoy tratando de hacer una cosa y no se como, me explico, tengo un ComboBox, tengo un sitio pequeño y la lista las opciones tienen textos anchos. Mi pregunta es la siguiente puedo definir un combobox de 75 pixel de ancho y cuando el usuario pinche en él aumente a 700 pixel.
Un saludo
Gracias anticipadas
Carlos[/quote:1j3o3i23]
Prueba esto:
[code=fw:1j3o3i23]<div class="fw" id="{CB}" style="font-family: monospace;"> oMicombobox:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span> || oMicombobox:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span> oMicombobox:<span style="color: #000000;">nTop</span>, ;<br /> oMicombobox:<span style="color: #000000;">nLeft</span>, ;<br /> <span style="color: #000000;">700</span>, ;<br /> oMicombobox:<span style="color: #000000;">nHeight</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oMicombobox:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">{</span> || oMicombobox:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span> oMicombobox:<span style="color: #000000;">nTop</span>, ;<br /> oMicombobox:<span style="color: #000000;">nLeft</span>, ;<br /> <span style="color: #000000;">75</span>, ;<br /> oMicombobox:<span style="color: #000000;">nHeight</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:1j3o3i23]
a ver si hay suerte. |
ComboBox | Hola a todos:
Gracias Carlos G. por tu solucion, funcina como yo queria, un saludo.
Carlos |
ComboBox | Colin,
We have traced it and Method GotFocus() is called, but the calls to ::SetCurPos() or ::SetSel() don't work from within the method. Called externally, they are fine.
I have done lots of tests.
I have search the web for some hints, but found nothing yet. In the menatime I have asked Rafa Carmona for a hint as he is used to GTK+ also <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
ComboBox | Hi All
In the code below should the combobox show cComboVar ("B") it always displays "A"
Colin
[code=fw:36kq74k1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveLinux.ch"</span><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oWnd,oCombo,aItems := <span style="color: #000000;">{</span><span style="color: #ff0000;">"A"</span>,<span style="color: #ff0000;">"B"</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">}</span>,cComboVar := <span style="color: #ff0000;">"B"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">600</span><br /> <br /> @<span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo <span style="color: #0000ff;">VAR</span> cComboVar <span style="color: #0000ff;">of</span> oWnd <span style="color: #0000ff;">ITEMS</span> aItems <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">VALID</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Are you sure ?"</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #00C800;">return</span><span style="color: #000000;">(</span><span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> <br /><br /><br /> </div>[/code:36kq74k1] |
ComboBox | Colin,
In Class TComboBox Method New() you have to swap these lines:
::SetItems( aItems )
::SetText( Eval( bSetGet ) )
with such change is working fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
ComboBox | Hi Antonio
Thanks - combobox working ok - any update on the problems with gets.
Cheers
Colin |
ComboBox | Colin,
In FiveLinux/source/winapi/gets.c I have replaced:
[code=fw:367dzx96]<div class="fw" id="{CB}" style="font-family: monospace;"> gtk_signal_connect<span style="color: #000000;">(</span> GTK_OBJECT<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"focus_in_event"</span>,<br /> G_CALLBACK<span style="color: #000000;">(</span> GotFocusEvent <span style="color: #000000;">)</span>, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;</div>[/code:367dzx96]
with:
[code=fw:367dzx96]<div class="fw" id="{CB}" style="font-family: monospace;"> gtk_signal_connect_after<span style="color: #000000;">(</span> GTK_OBJECT<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"focus_in_event"</span>,<br /> G_CALLBACK<span style="color: #000000;">(</span> GotFocusEvent <span style="color: #000000;">)</span>, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;</div>[/code:367dzx96]
but it seems as it does not work as expected. I keep searching... |
ComboBox | Problem solved! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
This line made the trick:
[code=fw:1kth6ddl]<div class="fw" id="{CB}" style="font-family: monospace;"> g_object_set<span style="color: #000000;">(</span> gtk_widget_get_settings<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>,<br /> <span style="color: #ff0000;">"gtk-entry-select-on-focus"</span>, <span style="color: #00C800;">FALSE</span>, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;</div>[/code:1kth6ddl]
I am going to provide a new FiveLinux download with this change |
ComboBox | Hi Antonio
I downloaded the latest version and copied the libs to the right location and recompiled but the
following error occurs on compiling and linking.
/home/colin/fivelinux/lib/libfivec.a(lnx.o): In function `button_press_event':
lnx.c:(.text+0xaad): undefined reference to `hb_extIsNil'
collect2: ld returned 1 exit status
Thanks for the great effort with this.
Regards
Colin |
ComboBox | Colin,
What Harbour version are you using ? |
ComboBox | Hi Antonio
Harbour 3.0.0 (Rev 16951)
Cheers
Colin |
ComboBox | Hi Antonio
Hi downloaded the version on your site and still get the same error.
Harbour 3.2.0dev (Rev 18412)
Cheers
Colin |
ComboBox | Colin,
It seems to me as you are using a wrong header file somewhere.
Please search for hb_extIsNil in all Harbour source code (and header files) and in FiveLinux sources. I don't find it.
Thats why I guess that we are not using the same header files. |
ComboBox | Hi Antonio
The error appears to point to this file.
/fivewin/source/internal/lnx.c
home/colin/fivelinux/lib/libfivec.a(lnx.o): In function `button_press_event':
lnx.c:(.text+0xaad): undefined reference to `hb_extIsNil'
[code=fw:2f4echwj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />gboolean button_press_event<span style="color: #000000;">(</span> GtkWidget * hWnd, GdkEventButton * event <span style="color: #000000;">)</span> <br /><span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> event->button == <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <br /> <span style="color: #000000;">{</span> <br /> hb_vmPushSymbol<span style="color: #000000;">(</span> pFLH <span style="color: #000000;">)</span>;<br /> hb_vmPushNil<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> WM_LBUTTONDOWN <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// nMsg</span><br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HB_ULONG <span style="color: #000000;">)</span> event->y <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// nWParam</span><br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HB_ULONG <span style="color: #000000;">)</span> event->x <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// nLParam</span><br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HB_ULONG <span style="color: #000000;">)</span> gtk_object_get_data<span style="color: #000000;">(</span> GTK_OBJECT<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"WP"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> hb_vmFunction<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #00C800;">return</span> ! HB_ISNIL<span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// FALSE invokes default behavior</span><br /><br /> </div>[/code:2f4echwj]
Cheers
Colin |
ComboBox | Solved on TeamViewer, simply updating everything from the SVN repositories and rebuilding everything <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
ComboBox | Amigos
favor su ayuda comienzo a utilizar la clase TMsql y necesito abrir un combobox relacionando 2 tablas, por un código en común, aquí un ejemplo de como lo realizo:
***ABRO LAS TABLAS
::oCliente := ::oMain:oCon:Query( "SELECT * FROM MAANALIS" ) //esta tabla contiene un campo TIPO_CLIENTE
::oTipo_Clientes := ::oMain:oCon:Query( "SELECT * FROM COTIPANA" ) //esta tabla contienen los tipos de clientes
*** CREO UN ARREGLO CON LOS DATOS DEL TIPO DE CLIENTES PARA LUEGO RELACIONARLO CON CADA CLIENTE
::aCte := Array( 02 )
::aCte[01] := {}
::aCte[02] := {}
WHILE !::oTipo_Clientes :eof()
AAdd( ::aCte[01], ::oTipo_Clientes:descripcion )
AAdd( ::aCte[02], ::oTipo_Clientes:tipo_cliente )
::oTipo_Clientes:skip()
ENDDO
*** ASI INTENTO RELACIONAR LAS TABLAS, para mostrar el la seleccion en el combobox
::vCmb[01] := ::aCte[01][max( 1,aScan( ::aCte[02], { |a|a = ::oClientes("TIPO_CLIENTE") } ) ) ]
***LUEGO ABRO EL COMBOBOX EN UN DIALOGO
Redefine ComboBox ::oCmb[01] VAR ::vCmb[01] Id 107 Of oDlg1 Items ::aCte[01]
No logro hacer que al seleccionar un cliente se muestre asociado a un tipo..
alguna sugerencia, se los agradezco
salu2 |
ComboBox | Puedes mostrar una captura de pantalla para ver el diálogo ? gracias |
ComboBox | [quote="Antonio Linares":hlnoq8rg]Puedes mostrar una captura de pantalla para ver el diálogo ? gracias[/quote:hlnoq8rg]
gracias Antonio
[img:hlnoq8rg]http://imageshack.us/content_round.php?page=done&l=img716/1116/v1wx.jpg[/img:hlnoq8rg]
lo que intento es que desde el combobox guardar un tipo de cliente (Proveedor, Cliente, honorarios u otro) luego al editarlo que en la edicion se muestre lo que se selecciono y guardo previamente.. lo que actualmente me ocurre es que al editar solo me muestra el primer dato del combobox y no lo que se guardo en la tabla.
gracias. |
ComboBox | Es un combo desde código o recursos ???
Saludos |
ComboBox | [quote="horacio":1tjlsu48]Es un combo desde código o recursos ???
Saludos[/quote:1tjlsu48]
si el combobox es desde un recurso
gracias.. |
ComboBox | Si utilizas Pelles-C, prueba desactivar el estilo sort.
Saludos |
ComboBox | [quote="horacio":b9chyz4n]Si utilizas Pelles-C, prueba desactivar el estilo sort.
Saludos[/quote:b9chyz4n]
Tengo desactivado el sort!!
sigo probandoooo..
gracias |
ComboBox | Hola,
muchas veces para asociar dos arrays con un COMBOBOX, como ser códigos y descripciones, es mejor utilizar del DBCOMBO
REDEFINE DBCOMBO ::oCmb[01] ;
VAR ::vCmb[01] ;
ID 107 ;
OF oDlg1
LIST ::aCte[01] ;
ITEMS ::aCte[02]
saludos
Marcelo |
ComboBox | [quote="Marcelo Via Giglio":2zryrgkc]Hola,
muchas veces para asociar dos arrays con un COMBOBOX, como ser códigos y descripciones, es mejor utilizar del DBCOMBO
REDEFINE DBCOMBO ::oCmb[01] ;
VAR ::vCmb[01] ;
ID 107 ;
OF oDlg1
LIST ::aCte[01] ;
ITEMS ::aCte[02]
saludos
Marcelo[/quote:2zryrgkc]
mmm nunca he utilizado DBCOMBO me marca error al compilar... en la linea del DBCOMBO |
ComboBox | Hola,
debes de incluir el archivo de cabecera en tu prg
#include "dbcombo.ch"
saludos
Marcelo |
ComboBox | Hola a todos:
Tengo en varias opciones ComboBox, mi pregunta es si la flecha que presenta el ComboBox se puede poner a la izquierda en vez de la derecha que me aparece siempre.
Un saludo
Carlos |
ComboBox | Carlos,
Estos son los estilos que soporta un combobox:
[url:7u8awq03]https://msdn.microsoft.com/en-us/library/7h63bxbe(VS.80).aspx[/url:7u8awq03]
Parece que no está soportado lo que buscas, asi que habría que implementarlo. |
ComboBox | Hola Antonio:
Eso ya lo había visto y no veo lo que yo pregunto, porque no se si hay alguna manera de cambiar la flecha a la izquierda ya que estéticamente las variables que están a la izquierda y necesito cambiar el tamaño de la ComboBox para elegir la flecha se va a la derecha cuando pulsas y quedaría mejor si se pudiese presentar a la izquierda.
Un saludo y gracias por tu interés.
Carlos |
ComboBox | Carlos,
A eso me refiero, a que un combobox estandard de Windows no lo soporta, asi que habría que buscar otra forma de implementarlo.
Podrias situar un botón y a continuación un GET y que al pulsar el botón se mostrase una lista como hace el combobox.
Te serviría asi ? |
ComboBox | Con el Pelles C lo puedes hacer asi, te anexo imagenes, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Si te refieres a esto...esta probado en mi sistema, la primera imagen es de mi sistema, no el previo de pelles c.
Aca esta como se hace con los parametros de windows, [b:2hd21za1]Extended Window Styles[/b:2hd21za1]
[b:2hd21za1]WS_EX_LEFTSCROLLBAR Places a vertical scroll bar to the left of the client area.
[/b:2hd21za1]
<!-- m --><a class="postlink" href="https://msdn.microsoft.com/en-us/library/61fe4bte%28v=vs.80%29.aspx">https://msdn.microsoft.com/en-us/librar ... 80%29.aspx</a><!-- m -->
[img]
[url=http://www.subirimagenes.com/otros-flechita-9450008.html:2hd21za1][img:2hd21za1]http://s2.subirimagenes.com/otros/previo/thump_9450008flechita.jpg[/img:2hd21za1][/url:2hd21za1]
[url=http://www.subirimagenes.com/otros-flechita2-9450009.html:2hd21za1][img:2hd21za1]http://s2.subirimagenes.com/otros/previo/thump_9450009flechita2.jpg[/img:2hd21za1][/url:2hd21za1]
[url=http://www.subirimagenes.com/otros-flechita3-9450010.html:2hd21za1][img:2hd21za1]http://s2.subirimagenes.com/otros/previo/thump_9450010flechita3.jpg[/img:2hd21za1][/url:2hd21za1]
[/img] |
ComboBox | Hola José Luis:
Si es exactamente lo que yo pregunto pero yo no uso Pelles C yo pongo :
@150, 90 ComboBx xPul16 VAR va111 ITEMS { " 1", " 2" , " 3" } OF wGestd1901 PIXEL COLOR escri30, fondo30 SIZE 80, 144 ON CHANGE CambTiSu() STYLE CBS_DROPDOWNLIST
He tratado de incluir el estilo que me comentas así:
@150, 90 ComboBx xPul16 VAR va111 ITEMS { " 1", " 2" , " 3" } OF wGestd1901 PIXEL COLOR escri30, fondo30 SIZE 80, 144 ON CHANGE CambTiSu() STYLE nOr (CBS_DROPDOWNLIST, WS_EX_LEFTSCROLLBAR )
Pero no me da este error :
Error description: Error BASE/1003 No existe la variable: WS_EX_LEFTSCROLLBAR
Un saludo
Carlos |
ComboBox | No te se decir si es la variable, ya que hago mis recursos con el diseñador, lo que te podria recomendar es empezar hacer ley del descarte con ese nombre que da microsoft o usar el editor de recurso y ver el codigo en .RC que lo pone como lo haces tu...imagino alli saldra la variable como viene por defecto a la derecha y cambiar el RIGHT por un LEFT, hasta alla no he llegado, ya que uso mis recursos en .RES, dejame probar y te comento haber si te ayudo, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox | Acabo hacer el archivo .rc y asi aparec lo del combobox...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
[code=fw:2s3t3w88]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #000000;">1001</span> DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">198</span><br /><span style="color: #0000ff;">STYLE</span> DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br />CAPTION <span style="color: #ff0000;">"Dialog"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">4015</span>, <span style="color: #ff0000;">"ComboBox"</span>, WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, <span style="color: #000000;">36</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">50</span>, WS_EX_LEFTSCROLLBAR<br /><span style="color: #000000;">}</span><br /> </div>[/code:2s3t3w88] |
ComboBox | Carlos
[code=fw:gqs22zdh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> WS_EX_LEFTSCROLLBAR 0x00004000<br /> </div>[/code:gqs22zdh]
[url:gqs22zdh]https://msdn.microsoft.com/es-es/library/windows/desktop/ff700543(v=vs.85).aspx[/url:gqs22zdh] |
ComboBox | Jose Luis
El link esta solucionado, gracias
Si, he entendido que contestabas a Carlos, solo era un comentario
TCalex, si tengo hecho algo con ella
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25167&hilit=tcalex&start=45#p142195">viewtopic.php?f=6&t=25167&hilit=tcalex&start=45#p142195</a><!-- l -->
TPlane, no me suena por eso te comento donde ver su contenido, hace ya tiempo que no toco TCalex |
ComboBox | [quote="cnavarro":1uhdlv1b]Carlos
[code=fw:1uhdlv1b]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> WS_EX_LEFTSCROLLBAR 0x00004000<br /> </div>[/code:1uhdlv1b]
<!-- m --><a class="postlink" href="https://msdn.microsoft.com/es-es/library/windows/desktop/ff700543(v=vs.85">https://msdn.microsoft.com/es-es/librar ... 43(v=vs.85</a><!-- m -->).aspx[/quote:1uhdlv1b]
Saludos CNavarro, si Carlos usara un editor de recurso como Pelles C, se evitaria todo eso, pero bueno, ni modo, entre gustos y colores...
aprovechando que comentastes aca...por casualidad tendras o hay una version mas actualizada de la TPlane y la TCalex pero que no sea el de las Contribuciones ya que esa version es bastante vieja y hay muchos cambios que no estan publicados, gracias..saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox | Jose Luis
Yo es que hace tiempo que no utililizo Recursos ( bueno, si, ficheros RCs para imagenes, y poco mas )
Voy a buscar la TCalex que tengo y compararla con la que comentas, pero no me suena la TPlane, asi que dime donde la has visto
Saludos |
ComboBox | [quote="cnavarro":2agmoizs]Jose Luis
Yo es que hace tiempo que no utililizo Recursos ( bueno, si, ficheros RCs para imagenes, y poco mas )
Voy a buscar la TCalex que tengo y compararla con la que comentas, pero no me suena la TPlane, asi que dime donde la has visto
Saludos[/quote:2agmoizs]
Navarro, me referia a Carlos por lo de usar Pelles C, la clase es la TPlan...disculpa se me coleo un e...es la que sirve para sistema de Hoteles, reservas y esas cosas, y la TCalex es la del calendario tipo outlook o algo asi, disculpa mi error, creo que ambas las hizo Daniel Gil(saludos desde Venezuela), gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=28177&p=157618&hilit=clase+tplan#p157618">viewtopic.php?f=6&t=28177&p=157618&hilit=clase+tplan#p157618</a><!-- l -->
PostData: le hago click al link que pusistes y dice que no existe o que si esta bien escrito... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> |
ComboBox | [quote="cnavarro":3rnf8001]Jose Luis
El link esta solucionado, gracias
Si, he entendido que contestabas a Carlos, solo era un comentario
TCalex, si tengo hecho algo con ella
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25167&hilit=tcalex&start=45#p142195">viewtopic.php?f=6&t=25167&hilit=tcalex&start=45#p142195</a><!-- l -->
TPlane, no me suena por eso te comento donde ver su contenido, hace ya tiempo que no toco TCalex[/quote:3rnf8001]
Es lo que busco hacer...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
TCAlex
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=28038&p=180689&hilit=tcalex#p180689">viewtopic.php?f=6&t=28038&p=180689&hilit=tcalex#p180689</a><!-- l -->
TPlan
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25728&hilit=clase+tplan">viewtopic.php?f=6&t=25728&hilit=clase+tplan</a><!-- l --> |
ComboBox | Pues si existía el estilo:
#define WS_EX_LEFTSCROLLBAR 0x00004000
gracias Cristobal <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
ComboBox | [quote="cnavarro":28veo8uj]Jose Luis
El link esta solucionado, gracias
Si, he entendido que contestabas a Carlos, solo era un comentario
TCalex, si tengo hecho algo con ella
<!-- m --><a class="postlink" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25167&hilit=tcalex&start=45#p142195">http://forums.fivetechsupport.com/viewt ... 45#p142195</a><!-- m -->
TPlane, no me suena por eso te comento donde ver su contenido, hace ya tiempo que no toco TCalex[/quote:28veo8uj]
Ok, sera que podrias compartir algo de como usarla principalmente con mysql, o lo que tengas, algo sencillo y entendible para novatos y si es posible alguna imagen.?, como que pido demasiado, pero aca en mi pais se dice..pida que usted no sabe si estan a punto de darle...si quieres puedes enviarlo a mi privado, en el link de abajo puse lo que ando buscando hacer y creo esta funcion TCAlex es la mejor opcion, gracias de antemano...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
<!-- e --><a href="mailto:joseluisysturiz@yahoo.com">joseluisysturiz@yahoo.com</a><!-- e -->
<!-- e --><a href="mailto:joseluisysturiz@gmail.com">joseluisysturiz@gmail.com</a><!-- e -->
<!-- e --><a href="mailto:joseluisy@hotmail.com">joseluisy@hotmail.com</a><!-- e --> |
ComboBox | Hola y gracias a todos:
Estoy intentando poner lo que me habéis dicho y si me lo implementa pero en vez de poner la flecha a la izquierda lo que hace es poner todo en minúsculas. Lo hago así
@150, 90 ComboBx xPul16 VAR va111 ITEMS { " 1", " 2" , " 3" } OF wGestd1901 PIXEL COLOR escri30, fondo30 SIZE 80, 144 ON CHANGE CambTiSu() STYLE nOr (CBS_DROPDOWNLIST, WS_EX_LEFTSCROLLBAR )
He seguido el enlace que dice Cristóbal y aparece esto:
WS_EX_LEFTSCROLLBAR 0x00004000L
If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored.
Que con mi ingles limitado y google he traducido.
Si el lenguaje seleccionado es hebreo, árabe, o en otro idioma que soporta la lectura de la alineación orden, la barra de desplazamiento vertical (si está presente) está a la izquierda del área de cliente. Para otros idiomas, se ignora el estilo.
Por lo que creo entender que si no tengo seleccionado uno de los lenguajes que la lectura es de derecha a izquierda ignora el estilo.
Por otra parte observando lo que ha puesto José Luis del RC observo que el poner la flecha a la izquierda está fuera del STYLE o por lo menos lo pone separado al final por lo supongo que para hacerlo debe de hacerse fuera del STYLE
{
CONTROL "", 4015, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, 36, 12, 140, 50, WS_EX_LEFTSCROLLBAR
}
Por otra parte Cristóbal todavía tenemos un tema pendiente con lo del error de la ComboBox que tuve que dejar para poder terminar el programa. He realizado mas pruebas ya te comentaré para ver si se te ocurre algo.
Un saludo
Carlos |
ComboBox | Carlos, en mis recursos los tengo con idiona Español-Venezuela y en mi sistema funciona bien la flechita a la izquierda, pero como dije antes, diseño mis recursos con Pelles C y me evito esos inconvenientes como el que se te presenta, ahora como te dijo Navarro no lo he probado, como te dije antes, seria cuestion de ir haciendo ley del descarte en la ubicacion del parametro, te envie como me lo convierte pelles c al pasarlo de .res a .rc, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox | en resedit, facil
[img:3nfeh2tv]http://i.imgur.com/pJe4yjP.png[/img:3nfeh2tv] |
ComboBox | Carlos Varga, es que tu tocayo no usa editor de recurso, le sugeri usara Pelles C, pero bueno, ni modo...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox | Hola Carlos y José Luis:
Ante todo gracias por vuestra ayuda e interés.
Veo que con un editor de recursos podría realizar fácilmente lo que me proponía y no es que no quiera usarlo el problema es que si lo utilizo tendría que cambiar toda la programación que tengo a programación con recursos. Yo he programado siempre (desde 1986) como digo yo "a mano" y tengo tantos automatismos que no me cuesta crear ventanas y posicionar datos como quiera en poco tiempo. Y con esto puedo manipular mejor las cosas que hay en la ventana. Por ahora solo no he podido solucionar cosas estéticas que me parecen que quedan mejor de otra forma y si no se puede por el motivo que sea se busca otra solución. Dentro de esto podría estar el SAY con sombra o la COMBOBOX con la flecha a la izquierda. Y un error que todavía estoy detrás con la ComboBox cuando se elimina la ventana y se vuelve a crear. Yo no digo que utilizar PellesC o Resedit sea mejor o peor sino que tendrá sus ventajas y sus inconvenientes.
Yo solo preguntaba que si se podía hacer de la manera que yo programo, si se puede bien y sino pues a seguir que es perder tiempo y esperar si Antonio y su equipo lo puede incluir en versiones siguientes.
Un saludo
Carlos |
ComboBox | Carlos, y ya probastes como dijo CNavarro,.? ya que esa parece la solucion a como tu trabajas, no lo he probado ya que como es sobre entendido, uso editor de recursos...intenta como dice el si no lo has hecho y si no te sirve, te aseguro que de alguna forma se resolvera y haras el combo box como quieres, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Asi comento CNavaro se hacia de forma manual, agregando esta linea en tu prg.
[code=fw:1akdmb7c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> WS_EX_LEFTSCROLLBAR 0x00004000<br /> </div>[/code:1akdmb7c] |
ComboBox | Hola José Luis:
Si lo he probado y he comentado antes lo que me pasaba y esto era que me ponía todo en minúsculas. Pero no me ponía a la izquierda la flecha.
Un saludo y gracias
Carlos |
ComboBox | Jose Luis, Carlos
He hecho pruebas añadiendo tanto en un Prg como en la clase dicho estilo en ::nExStyle, sin resultados
Hay que probarlo tambien en el ::nStyle, pero creo que no deberia ser asi |
ComboBox | Jose Luis
Como tienes ya desarrollado un programa en el que usas el Redefine y ese estilo, ¿puedes comprobar si el valor de oCombo:nExStyle es ese?, para seguirle la pista de donde asigna ese estilo |
ComboBox | Navarro, en el Pelles ese cambio aparece en Extended window styles, pase el .res a .rc y esto es lo que hace, en una de mis respuestas, esta la imagen del pelles y el .rc que te voy a colocar, no se si eso te ayuda en algo, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
El .rc con el cambio de la flecita a la izquierda...
[code=fw:14xq7ns2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #000000;">1001</span> DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">198</span><br /><span style="color: #0000ff;">STYLE</span> DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br />CAPTION <span style="color: #ff0000;">"Dialog"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">4015</span>, <span style="color: #ff0000;">"ComboBox"</span>, WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, <span style="color: #000000;">36</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">[</span>b<span style="color: #000000;">]</span>WS_EX_LEFTSCROLLBAR<span style="color: #000000;">[</span>/b<span style="color: #000000;">]</span><span style="color: #000000;">}</span><br /> </div>[/code:14xq7ns2] |
ComboBox | Si vi la imagen y el contenido de tu RC
Es por eso que te comento que pongas en tu aplicacion un MsgInfo( oCombo:nExStyle ) para comprobar que lo asina a la DATA de Windows ( y por lo tanto del control ) |
ComboBox | Hola Cristóbal:
Como añades al nExStyle a la combobox.
Un saludo
CArlos |
ComboBox | [quote="colthop":1bd5622f]Hola Cristóbal:
Como añades al nExStyle a la combobox.
Un saludo
CArlos[/quote:1bd5622f]
Modificando la clase
En el new
[code=fw:1bd5622f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> .../...<br /> ::<span style="color: #000000;">nStyle</span> = nOR<span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nStyle == CBS_DROPDOWN, <span style="color: #000000;">0</span>, LBS_NOTIFY <span style="color: #000000;">)</span>, WS_TABSTOP,;<br /> nStyle,;<br /> LBS_DISABLENOSCROLL, WS_CHILD, WS_VISIBLE, WS_BORDER,;<br /> WS_VSCROLL, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lDesign, WS_CLIPSIBLINGS, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">lOwnerDraw</span>, CBS_OWNERDRAWFIXED, ;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> nHGet <span style="color: #000000;">)</span>, CBS_OWNERDRAWVARIABLE, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> ::<span style="color: #000000;">nExStyle</span> = nOr<span style="color: #000000;">(</span> ::<span style="color: #000000;">nExStyle</span>, 0x00004000 <span style="color: #000000;">)</span><br /> .../...<br /> </div>[/code:1bd5622f] |
ComboBox | [quote="cnavarro":3ukqs1lv]Si vi la imagen y el contenido de tu RC
Es por eso que te comento que pongas en tu aplicacion un MsgInfo( oCombo:nExStyle ) para comprobar que lo asina a la DATA de Windows ( y por lo tanto del control )[/quote:3ukqs1lv]
Navarro, esto solo me devuelve NIL, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox | Hola Cristóbal y Jose Luis:
En primer lugar comentarle a Cristóbal que hecho pruebas con lo que me dijiste ayer y si sino lo pongo me pone NIL como a José Luis y si lo pongo me pone "16384" pero he cambiado el Style y en vez de 0x00004000 puse 0x00000000 que es otro que pone en la página del enlace y me sigue poniendo !16384" cambie a dos o tres números y seguía poniendo el mismo numero. Parece que no lo coge.
Por otra parte pediría a Jose Luis que si puede hacer dos capturas de la ComboBox en el programa una abierta y la otra cerrada. Para ver el resultado.
Un saludo
Carlos |
ComboBox | Carlos, estoy haciendo pruebas
Efectivamente tal y como comentan con un RC funciona (he modificado para hacer pruebas el RC que viene con FivEdit ) y obtengo los mismos valores que Jose Luis y que tu.
Con recursos el valor obtenido en 0
[code=fw:b4t94ns3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Generated by ResEdit 1.6.2</span><br /><span style="color: #B900B9;">// Copyright (C) 2006-2014</span><br /><span style="color: #B900B9;">// <!-- m --><a class="postlink" href="http://www.resedit.net">http://www.resedit.net</a><!-- m --></span><br /><br /><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br />editor <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">18</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">223</span><br /><span style="color: #0000ff;">STYLE</span> DS_3DLOOK | DS_SETFONT | WS_CHILDWINDOW<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Ms Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> LTEXT <span style="color: #ff0000;">"Text color"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">11</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">8</span>, SS_LEFT, WS_EX_LEFT<br /> EDITTEXT <span style="color: #000000;">110</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">21</span>, <span style="color: #000000;">232</span>, <span style="color: #000000;">13</span>, <span style="color: #000000;">0</span>, WS_EX_LEFT<br /> LTEXT <span style="color: #ff0000;">"Back color"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">38</span>, <span style="color: #000000;">35</span>, <span style="color: #000000;">8</span>, SS_LEFT, WS_EX_LEFT<br /> EDITTEXT <span style="color: #000000;">120</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">48</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">13</span>, <span style="color: #000000;">0</span>, WS_EX_LEFT<br /> LTEXT <span style="color: #ff0000;">"Caret line back color:"</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">66</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">8</span>, SS_LEFT, WS_EX_LEFT<br /> EDITTEXT <span style="color: #000000;">130</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">75</span>, <span style="color: #000000;">232</span>, <span style="color: #000000;">13</span>, ES_AUTOHSCROLL, WS_EX_LEFT<br /> LTEXT <span style="color: #ff0000;">"Font:"</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">92</span>, <span style="color: #000000;">17</span>, <span style="color: #000000;">8</span>, SS_LEFT, WS_EX_LEFT<br /> EDITTEXT <span style="color: #000000;">140</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">232</span>, <span style="color: #000000;">13</span>, ES_AUTOHSCROLL, WS_EX_LEFT<br /> LTEXT <span style="color: #ff0000;">"Theme"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">122</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">8</span>, SS_LEFT, WS_EX_LEFT<br /> <span style="color: #0000ff;">COMBOBOX</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">132</span>, <span style="color: #000000;">78</span>, <span style="color: #000000;">14</span>, CBS_DROPDOWN | CBS_HASSTRINGS, WS_EX_LEFT | WS_EX_LEFTSCROLLBAR<br /><span style="color: #000000;">}</span><br /> </div>[/code:b4t94ns3]
Adjunto imagen de su efecto
[url=http://postimage.org/:b4t94ns3][img:b4t94ns3]http://s30.postimg.org/ph1e5dg3l/Title197.png[/img:b4t94ns3][/url:b4t94ns3] |
ComboBox | Hola Cristóbal:
He estado mirando y he visto lo siguiente, en mi PRG existe la siguiente línea:
[code=fw:vtzc2v0j]<div class="fw" id="{CB}" style="font-family: monospace;">@<span style="color: #000000;">150</span>*ProPorV, <span style="color: #000000;">90</span>*ProporH <span style="color: #0000ff;">combobox</span> xPul16 <span style="color: #0000ff;">VAR</span> va111 <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">" "</span> + LocaText<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>,<span style="color: #000000;">530</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">" "</span> + LocaText<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>,<span style="color: #000000;">531</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">" "</span> + LocaText<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>,<span style="color: #000000;">532</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #0000ff;">OF</span> wGestd1901 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">COLOR</span> escri30, fondo30 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>*ProporH, <span style="color: #000000;">144</span>*ProPorV <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> CambTiSu<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWNLIST</div>[/code:vtzc2v0j]
Cuando yo compilo hago los siguientes pasos:
%hdir%harbour gesti190.prg /n /p
%bdir%bcc32 -M -c -O2 -Ic:\harbour\include -Ic:\bcc582\include gesti190.c
El primero crea un gesti190.c y gesti190.ppo con el segundo crea el gesti190.obj
He mirado el .c y hace referencia a xPul16 de la siguiente forma:
{ "XPUL16", {HB_FS_PUBLIC | HB_FS_MEMVAR}, {NULL}, NULL },
Y mirando el .ppo hace referencia a xPul16 de la siguiente forma:
[code=fw:vtzc2v0j]<div class="fw" id="{CB}" style="font-family: monospace;">xPul16 := TComboBox<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">150</span>*ProPorV, <span style="color: #000000;">90</span>*ProporH, <span style="color: #000000;">{</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> PCount<span style="color: #000000;">(</span><span style="color: #000000;">)</span>==<span style="color: #000000;">0</span>, va111, va111:= u <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">" "</span> + LocaText<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>,<span style="color: #000000;">530</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">" "</span> + LocaText<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>,<span style="color: #000000;">531</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">" "</span> + LocaText<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>,<span style="color: #000000;">532</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">80</span>*ProporH, <span style="color: #000000;">144</span>*ProPorV, wGestd1901,, <span style="color: #000000;">{</span>|Self|CambTiSu<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span>,, escri30, fondo30, .T.,,, .F.,, .F.,,, <span style="color: #000000;">3</span>,,, <span style="color: #ff0000;">"xPul16"</span> <span style="color: #000000;">)</span></div>[/code:vtzc2v0j]
y según veo ya no esta el style viendo la WIKI he visto que cuando lo haces como yo no pasa el Style y cuando lo haces por recursos si:
[code=fw:vtzc2v0j]<div class="fw" id="{CB}" style="font-family: monospace;"> #xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">COMBOBOX</span> <span style="color: #000000;">[</span> <oCbx> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <cVar> ;<br /><span style="color: #000000;">[</span> <items: <span style="color: #0000ff;">ITEMS</span>, PROMPTS> <aItems> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <dlg:<span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS> <nClrText> <span style="color: #000000;">[</span>,<nClrBack><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <pixel: <span style="color: #000000;">PIXEL</span>> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span>> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">BITMAPS</span> <acBitmaps> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> DRAWITEM <uBmpSelect> <span style="color: #000000;">]</span> ;<br />=> ;<br /><span style="color: #000000;">[</span> <oCbx> := <span style="color: #000000;">]</span> TComboBox<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, bSETGET<span style="color: #000000;">(</span><cVar><span style="color: #000000;">)</span>,;<br /><aItems>, <nWidth>, <nHeight>, <oWnd>, <nHelpId>,;<br /><span style="color: #000000;">[</span><span style="color: #000000;">{</span>|Self|<uChange><span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <<span style="color: #000000;">{</span>uValid<span style="color: #000000;">}</span>>, <nClrText>, <nClrBack>,;<br /><.<span style="color: #0000ff;">pixel</span>.>, <oFont>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>,;<br /><.design.>, <acBitmaps>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|nItem|<uBmpSelect><span style="color: #000000;">}</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br />#xcommand <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> <span style="color: #000000;">[</span> <oCbx> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <cVar> ;<br /><span style="color: #000000;">[</span> <items: <span style="color: #0000ff;">ITEMS</span>, PROMPTS> <aItems> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">ID</span> <nId> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <dlg:<span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS> <nClrText> <span style="color: #000000;">[</span>,<nClrBack><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">BITMAPS</span> <acBitmaps> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> DRAWITEM <uBmpSelect> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">STYLE</span> <nStyle> <span style="color: #000000;">]</span> ;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">PICTURE</span> <cPicture> <span style="color: #000000;">]</span>;<br /><span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #00C800;">EDIT</span> <span style="color: #0000ff;">CHANGE</span> <uEChange> <span style="color: #000000;">]</span> ;<br />=> ;<br /><span style="color: #000000;">[</span> <oCbx> := <span style="color: #000000;">]</span> TComboBox<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> <nId>, bSETGET<span style="color: #000000;">(</span><cVar><span style="color: #000000;">)</span>,;<br /><aItems>, <oWnd>, <nHelpId>, <<span style="color: #000000;">{</span>uValid<span style="color: #000000;">}</span>>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|Self|<uChange><span style="color: #000000;">}</span><span style="color: #000000;">]</span>,;<br /><nClrText>, <nClrBack>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>,;<br /><acBitmaps>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|nItem|<uBmpSelect><span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <nStyle>, <cPicture>,;<br /><span style="color: #000000;">[</span><<span style="color: #000000;">{</span>uEChange<span style="color: #000000;">}</span>><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> </div>[/code:vtzc2v0j]
Por lo que mi pregunta ahora es como se puede cambiar el estilo y el estilo extra de la ComboBox desde código, algo así como:
xPul16:nStyle(CBS_DROPDOWNLIST)
xPul16:nExStyle(WS_EX_LEFTSCROLLBAR) |
ComboBox | Carlos, en mi version de Fivewin, en el Fivewin.ch, aparece
[code=fw:1iwd5wlr]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">COMBOBOX</span> <span style="color: #000000;">[</span> <oCbx> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <cVar> ;<br /> <span style="color: #000000;">[</span> <it: <span style="color: #0000ff;">PROMPTS</span>, ITEMS> <aItems> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <dlg:<span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS> <nClrText> <span style="color: #000000;">[</span>,<nClrBack><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <pixel: <span style="color: #000000;">PIXEL</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">BITMAPS</span> <acBitmaps> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> DRAWITEM <uBmpSelect> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">STYLE</span> <nStyle> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <pict: <span style="color: #000000;">PICT</span>, PICTURE> <cPicture> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #00C800;">EDIT</span> <span style="color: #0000ff;">CHANGE</span> <uEChange> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> HEIGHTGET <nHGet> <span style="color: #000000;">]</span> ;<br /> => ;<br /> <span style="color: #000000;">[</span> <oCbx> := <span style="color: #000000;">]</span> TComboBox<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, bSETGET<span style="color: #000000;">(</span><cVar><span style="color: #000000;">)</span>,;<br /> <aItems>, <nWidth>, <nHeight>, <oWnd>, <nHelpId>,;<br /> <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|Self|<uChange><span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <<span style="color: #000000;">{</span>uValid<span style="color: #000000;">}</span>>, <nClrText>, <nClrBack>,;<br /> <.<span style="color: #0000ff;">pixel</span>.>, <oFont>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>,;<br /> <.design.>, <acBitmaps>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|nItem|<uBmpSelect><span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <nStyle>,;<br /> <cPicture>, <span style="color: #000000;">[</span><<span style="color: #000000;">{</span>uEChange<span style="color: #000000;">}</span>><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><<span style="color: #000000;">(</span>oCbx<span style="color: #000000;">)</span>><span style="color: #000000;">]</span>, <nHGet> <span style="color: #000000;">)</span><br /><br />#xcommand <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> <span style="color: #000000;">[</span> <oCbx> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <cVar> ;<br /> <span style="color: #000000;">[</span> <items: <span style="color: #0000ff;">PROMPTS</span>, ITEMS> <aItems> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ID</span> <nId> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <dlg:<span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS> <nClrText> <span style="color: #000000;">[</span>,<nClrBack><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">BITMAPS</span> <acBitmaps> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> DRAWITEM <uBmpSelect> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">STYLE</span> <nStyle> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <pict: <span style="color: #000000;">PICT</span>, PICTURE> <cPicture> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #00C800;">EDIT</span> <span style="color: #0000ff;">CHANGE</span> <uEChange> <span style="color: #000000;">]</span> ;<br /> => ;<br /> <span style="color: #000000;">[</span> <oCbx> := <span style="color: #000000;">]</span> TComboBox<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> <nId>, bSETGET<span style="color: #000000;">(</span><cVar><span style="color: #000000;">)</span>,;<br /> <aItems>, <oWnd>, <nHelpId>, <<span style="color: #000000;">{</span>uValid<span style="color: #000000;">}</span>>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|Self|<uChange><span style="color: #000000;">}</span><span style="color: #000000;">]</span>,;<br /> <nClrText>, <nClrBack>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>,;<br /> <acBitmaps>, <span style="color: #000000;">[</span><span style="color: #000000;">{</span>|nItem|<uBmpSelect><span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <nStyle>, <cPicture>,;<br /> <span style="color: #000000;">[</span><<span style="color: #000000;">{</span>uEChange<span style="color: #000000;">}</span>><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /><br /> </div>[/code:1iwd5wlr]
Lo que no hay es claúsula para nExStyle ( como creo que en ningun control ) |
ComboBox | [quote="colthop":3vo7wko0]Hola Cristóbal y Jose Luis:
En primer lugar comentarle a Cristóbal que hecho pruebas con lo que me dijiste ayer y si sino lo pongo me pone NIL como a José Luis y si lo pongo me pone "16384" pero he cambiado el Style y en vez de 0x00004000 puse 0x00000000 que es otro que pone en la página del enlace y me sigue poniendo !16384" cambie a dos o tres números y seguía poniendo el mismo numero. Parece que no lo coge.
Por otra parte pediría a Jose Luis que si puede hacer dos capturas de la ComboBox en el programa una abierta y la otra cerrada. Para ver el resultado.
Un saludo
Carlos[/quote:3vo7wko0]
Carlos , aca te agrega las imagenes solicitadas, lo que en si no entiendo que quieres conseguir ya que no importa donde yo coloque la felchita, igual mis opciones salen del lado izquierdo, no se si es que no entendi bien tu requerimiento...saludos
[img]
[url=http://www.subirimagenes.com/otros-comboboxcerrado-9453602.html:3vo7wko0][img:3vo7wko0]http://s2.subirimagenes.com/otros/previo/thump_9453602comboboxcerrado.jpg[/img:3vo7wko0][/url:3vo7wko0]
[url=http://www.subirimagenes.com/otros-comboabiertoizquierd-9453597.html:3vo7wko0][img:3vo7wko0]http://s2.subirimagenes.com/otros/previo/thump_9453597comboabiertoizquierd.jpg[/img:3vo7wko0][/url:3vo7wko0]
[url=http://www.subirimagenes.com/otros-comboabiertoderecha-9453588.html:3vo7wko0][img:3vo7wko0]http://s2.subirimagenes.com/otros/previo/thump_9453588comboabiertoderecha.jpg[/img:3vo7wko0][/url:3vo7wko0]
[/img] |
ComboBox | Carlos, Navarro, si esto es lo que le esta pasando al colega, el causante es la calusula RIGHT del Extended window styles, ya que haciendo pruebas fue que me sucedio lo que creo le pasa al Carlos, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
[img]
[url=http://www.subirimagenes.com/imagen-comboright1-9453639.html:3ty9wgk9][img:3ty9wgk9]http://s2.subirimagenes.com/imagen/previo/thump_9453639comboright1.png[/img:3ty9wgk9][/url:3ty9wgk9]
[url=http://www.subirimagenes.com/otros-comboright2-9453644.html:3ty9wgk9][img:3ty9wgk9]http://s2.subirimagenes.com/otros/previo/thump_9453644comboright2.jpg[/img:3ty9wgk9][/url:3ty9wgk9]
[url=http://www.subirimagenes.com/otros-comboright3-9453646.html:3ty9wgk9][img:3ty9wgk9]http://s2.subirimagenes.com/otros/previo/thump_9453646comboright3.jpg[/img:3ty9wgk9][/url:3ty9wgk9]
[/img]
Aca este el .rc de una prueba
TEXTO A LA DERECHA, FLECHITA A LA IZQUIERDA
[code=fw:3ty9wgk9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 8.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><span style="color: #00D7D7;">#include</span> <richedit.h><br /><br />LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US<br /><br /><span style="color: #000000;">1001</span> DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">278</span>, <span style="color: #000000;">182</span><br /><span style="color: #0000ff;">STYLE</span> DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br />CAPTION <span style="color: #ff0000;">"Dialog"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">4001</span>, <span style="color: #ff0000;">"ComboBox"</span>, WS_BORDER|CBS_DROPDOWNLIST|CBS_SORT|WS_VSCROLL|WS_TABSTOP, <span style="color: #000000;">40</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">184</span>, <span style="color: #000000;">40</span>, WS_EX_RIGHT<br /><span style="color: #000000;">}</span><br /> </div>[/code:3ty9wgk9]
TEXTO A LA IZQUIERDA, FLECHITA A LA IZQUIERDA
[code=fw:3ty9wgk9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 8.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><span style="color: #00D7D7;">#include</span> <richedit.h><br /><br />LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US<br /><br /><span style="color: #000000;">1001</span> DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">278</span>, <span style="color: #000000;">182</span><br /><span style="color: #0000ff;">STYLE</span> DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br />CAPTION <span style="color: #ff0000;">"Dialog"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">4001</span>, <span style="color: #ff0000;">"ComboBox"</span>, WS_BORDER|CBS_DROPDOWNLIST|CBS_SORT|WS_VSCROLL|WS_TABSTOP, <span style="color: #000000;">40</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">184</span>, <span style="color: #000000;">40</span><br /><span style="color: #000000;">}</span><br /> </div>[/code:3ty9wgk9]
CARLOS, revisa si tu diseño esta asi, ya que el [b:3ty9wgk9]WS_EX_LEFT[/b:3ty9wgk9] es el que alinea el contenido del combobox:
[code=fw:3ty9wgk9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">COMBOBOX</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">132</span>, <span style="color: #000000;">78</span>, <span style="color: #000000;">14</span>, CBS_DROPDOWN | CBS_HASSTRINGS, <span style="color: #000000;">[</span>b<span style="color: #000000;">]</span>WS_EX_LEFT<span style="color: #000000;">[</span>/b<span style="color: #000000;">]</span> | WS_EX_LEFTSCROLLBAR<br /> </div>[/code:3ty9wgk9]
No se si eso ayudara en algo, esperemos que si, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox | Aprovechando el tema, creo que hay manera de [b:2my185mq]agregar imagenes[/b:2my185mq] como opciones en combobox, hay algun sample de como hacerlo.? si alguien tiene un ejemplo o alguna sugerencia, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
ComboBox + Get ? | He visto en varias app la opcion escribir al interior de un ComboBox.
Existe ese tipo de control en FWH ?
Es decir, no es una especie de seek incremental dentro de un combobox, sino una especie de hibrido entre ambos.
Gracias de antemano. |
ComboBox - Consulta | Por favor si alguien pudiera ayudarme
Este es mi codigo
[code=fw:10k266c1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Filtra<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oCbx<br /> <span style="color: #00C800;">LOCAL</span> aoObjetos := <span style="color: #000000;">{</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> aoBtn := <span style="color: #000000;">{</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> cTitulo := <span style="color: #ff0000;">"Filtrado de cotizaciones"</span><br /> <span style="color: #00C800;">LOCAL</span> cId_Clave, cNomClave, cVar, aItems<br /> <br /> aItems := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Cliente "</span>,<span style="color: #ff0000;">"Equipo "</span>,<span style="color: #ff0000;">"Vendedor"</span><span style="color: #000000;">}</span><br /> <br /> cId_Clave := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span><br /> cNomClave := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> cVar := <span style="color: #ff0000;">"Cliente"</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Dlg_Filtra"</span> <span style="color: #0000ff;">TITLE</span> cTitulo<br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx <span style="color: #0000ff;">VAR</span> cVar <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> aItems<br /><br /> <span style="color: #00C800;">IF</span> <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">(</span>cVar,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> == <span style="color: #ff0000;">"C"</span> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Clave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Clave := ValCod<span style="color: #000000;">(</span> cId_Clave, <span style="color: #ff0000;">"cliente"</span> <span style="color: #000000;">)</span>, ;<br /> cNomClave := cliente->nombre, ;<br /> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave de cliente"</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del cliente"</span><br /> <br /> ELSEIF <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">(</span>cVar,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> == <span style="color: #ff0000;">"E"</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Clave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Clave := ValCod<span style="color: #000000;">(</span> cId_Clave, <span style="color: #ff0000;">"eqpo"</span> <span style="color: #000000;">)</span>, ;<br /> cNomClave := eqpo->nombre, ;<br /> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave de tipo de equipo"</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del equipo"</span><br /> <br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Clave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Clave := ValCod<span style="color: #000000;">(</span> cId_Clave, <span style="color: #ff0000;">"agente"</span> <span style="color: #000000;">)</span>, ;<br /> cNomClave := agente->nombre, ;<br /> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave del vendedor"</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del vendedor"</span><br /> <br /> <span style="color: #00C800;">ENDIF</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNomClave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">WHEN</span> .F.<br /> <br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Aceptar "</span> BITMAP <span style="color: #ff0000;">"BTN_OK"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para continuar"</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancelar "</span> BITMAP <span style="color: #ff0000;">"BTN_CAN"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para cancelar"</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:10k266c1]
Como le hago para que en el redefine combobox me actualice la variable cVar dependiendo del item que seleccione en el combo y en consecuencia pueda validar el codigo que esta en el IF ENDIF
Estoy pensando que algo tiene que ver la instruccion ON CHANGE en el combo pero no se como implementarla
De antemano muchas gracias
Saludos |
ComboBox - Consulta | Intenta algo como esto: (No Probado)
[code=fw:2lh7u0nt]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx <span style="color: #0000ff;">VAR</span> cVar <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> aItems <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> Validar<span style="color: #000000;">(</span>oDlg, cVar<span style="color: #000000;">)</span><br /><br /> </div>[/code:2lh7u0nt]
[code=fw:2lh7u0nt]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Validar<span style="color: #000000;">(</span>oDlg, cVar<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">(</span>cVar,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> == <span style="color: #ff0000;">"C"</span> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Clave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Clave := ValCod<span style="color: #000000;">(</span> cId_Clave, <span style="color: #ff0000;">"cliente"</span> <span style="color: #000000;">)</span>, ;<br /> cNomClave := cliente->nombre, ;<br /> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave de cliente"</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del cliente"</span><br /> <br /> ELSEIF <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">(</span>cVar,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> == <span style="color: #ff0000;">"E"</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Clave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Clave := ValCod<span style="color: #000000;">(</span> cId_Clave, <span style="color: #ff0000;">"eqpo"</span> <span style="color: #000000;">)</span>, ;<br /> cNomClave := eqpo->nombre, ;<br /> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave de tipo de equipo"</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del equipo"</span><br /> <br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Clave <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Clave := ValCod<span style="color: #000000;">(</span> cId_Clave, <span style="color: #ff0000;">"agente"</span> <span style="color: #000000;">)</span>, ;<br /> cNomClave := agente->nombre, ;<br /> oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave del vendedor"</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del vendedor"</span><br /> <br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2lh7u0nt]
No crees que te convendría más usar Forders??? Tan solo un comentario... |
ComboBox - Consulta | Muchas gracias por tu respuesta
Voy a ponerlo en practica y ya te estare informando
Saludos |
ComboBox - Consulta | Bayron
Me incline por Folders
Esta es mi imagen
[url:2k8algx1]http://img269.imageshack.us/img269/4373/filtra.jpg[/url:2k8algx1]
y este es mi codigo
[code=fw:2k8algx1]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CreaFiltro<span style="color: #000000;">(</span> oDlgCot <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg, oFld<br /> <span style="color: #00C800;">LOCAL</span> aoObjetos := <span style="color: #000000;">{</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> aoBtn := <span style="color: #000000;">{</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> cId_Cli := <span style="color: #ff0000;">""</span>, cId_Eqpo := <span style="color: #ff0000;">""</span>, cId_Ven := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">LOCAL</span> cNomCli := <span style="color: #ff0000;">""</span>, cNomEqpo := <span style="color: #ff0000;">""</span>, cNomVen := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">LOCAL</span> cTitulo := <span style="color: #ff0000;">"Filtrado de cotizaciones"</span><br /> <span style="color: #00C800;">LOCAL</span> nOpcion<br /> <br /> cId_Cli := cId_Eqpo := cId_Ven := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span><br /> cNomCli := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> cNomEqpo := cNomVen := SPACE<span style="color: #000000;">(</span><span style="color: #000000;">30</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Fld_Filtra"</span> <span style="color: #0000ff;">TITLE</span> cTitulo<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cliente"</span>, <span style="color: #ff0000;">"Equipo"</span>, <span style="color: #ff0000;">"Vendedor"</span> ;<br /> <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"Sub_Cliente"</span>, <span style="color: #ff0000;">"Sub_Equipo"</span>, <span style="color: #ff0000;">"Sub_Vendedor"</span><br /> <br /> <span style="color: #B900B9;">// Redefine controles dialogo 1 </span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Cli <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"!!!!!!"</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave del cliente"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Cli := ValCod<span style="color: #000000;">(</span> cId_Cli, <span style="color: #ff0000;">"cliente"</span><span style="color: #000000;">)</span>, ;<br /> cNomCli := cliente->nombre, ;<br /> nOpcion := <span style="color: #000000;">1</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del cliente"</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNomCli <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">WHEN</span> .F.<br /> <br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"A&ceptar "</span> ;<br /> BITMAP <span style="color: #ff0000;">"BTN_OK"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> Filtra<span style="color: #000000;">(</span> nOpcion, cId_Cli, cNomCli, oDlgCot <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Aceptar"</span> <span style="color: #0000ff;">UPDATE</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para Continuar"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancelar "</span> BITMAP <span style="color: #ff0000;">"BTN_CAN"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> lContinuar := .F., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Cancelar"</span> <span style="color: #0000ff;">UPDATE</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para Cancelar"</span> <br /> <br /> <span style="color: #B900B9;">// Redefine controles dialogo 2</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Eqpo <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"!!!!!!"</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave del equipo"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Eqpo := ValCod<span style="color: #000000;">(</span> cId_Eqpo, <span style="color: #ff0000;">"eqpo"</span><span style="color: #000000;">)</span>, ;<br /> cNomEqpo := eqpo->nombre, ;<br /> nOpcion := <span style="color: #000000;">2</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del equipo"</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNomEqpo <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">WHEN</span> .F.<br /> <br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"A&ceptar "</span> ;<br /> BITMAP <span style="color: #ff0000;">"BTN_OK"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> Filtra<span style="color: #000000;">(</span> nOpcion, cId_Eqpo, cNomEqpo, oDlgCot <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Aceptar"</span> <span style="color: #0000ff;">UPDATE</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para Continuar"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancelar "</span> BITMAP <span style="color: #ff0000;">"BTN_CAN"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> lContinuar := .F., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Cancelar"</span> <span style="color: #0000ff;">UPDATE</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para Cancelar"</span> <br /> <br /> <span style="color: #B900B9;">// Redefine controles dialogo 3 </span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cId_Ven <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"!!!!!!"</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clave del vendedor"</span> ;<br /> <span style="color: #0000ff;">VALID</span> EVAL <span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || cId_Ven := ValCod<span style="color: #000000;">(</span> cId_Ven, <span style="color: #ff0000;">"agente"</span><span style="color: #000000;">)</span>, ;<br /> cNomVen := agente->nombre, ;<br /> nOpcion := <span style="color: #000000;">3</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T. <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Introduzca o seleccione la clave del vendedor"</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNomVen <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">WHEN</span> .F.<br /> <br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"A&ceptar "</span> ;<br /> BITMAP <span style="color: #ff0000;">"BTN_OK"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> Filtra<span style="color: #000000;">(</span> nOpcion, cId_Ven, cNomVen, oDlgCot <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Aceptar"</span> <span style="color: #0000ff;">UPDATE</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para Continuar"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancelar "</span> BITMAP <span style="color: #ff0000;">"BTN_CAN"</span> TEXTRIGHT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> lContinuar := .F., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Cancelar"</span> <span style="color: #0000ff;">UPDATE</span><br /> aoBtn<span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presione para Cancelar"</span> <br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oninit<span style="color: #000000;">(</span> oDlg <span style="color: #000000;">)</span>, aoObjetos<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2k8algx1]
Muchas gracias por tu ayuda
Saludos |
ComboBox - como? | Estimados;
Tengo un combobox, contenido en un Dlg, que al abrir se muestra sin visualizar componente alguno (porque su VAR esta definida como "" ).
Luego de hacer una selección y finalmente procesar el contenido del Dlg, procedo a limpiar Gets, SAYs, y otros controles; todo oK, menos el Combo, que queda con la seleccion hecha.
Intuitivamente hago:
[code=fw:1cs39oke]<div class="fw" id="{CB}" style="font-family: monospace;">saoVtas<span style="color: #000000;">[</span>_CmbDoc<span style="color: #000000;">]</span>:<span style="color: #000000;">nAT</span>:= <span style="color: #000000;">0</span>, saoVtas<span style="color: #000000;">[</span>_CmbDoc<span style="color: #000000;">]</span>:<span style="color: #000000;">VarPut</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span>, saoVtas<span style="color: #000000;">[</span>_CmbDoc<span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:1cs39oke]
pero no vuelve a su condición inicial
Existe una manera?, como?
gracias |
ComboBox - como? | Mario, Si la var es una string vacia, tendrías que tener un items "" en el array de opciones, algo así { "", "uno", "dos", "tres" }
Saludos |
ComboBox - como? | que bolú!... tan sencillo como eso
muchas gracias |
ComboBox DropDown modificacion a clase | He modificado la clase combobox, ya que estoy utilizando el estilo DropDown, el cual al escribir algo en el get para realizar una búsqueda incremental en el arreglo de la lista de opciones que tengo, al presionar RETURN, no evalúa el siguiente combobox en un when y se salta a otro control.
Las lineas que se agregaron en la combobox son las siguientes lineas:
METHOD GetKeyChar( nKey ) CLASS TComboBox
local nAt, cText
local cSearch
if ( nKey == VK_TAB .and. ! GetKeyState( VK_SHIFT ) ) .or. nKey == VK_RETURN // mi modificacion
**************
if ::bChange != nil // estas son la lineas que se agregaron,
Eval( ::bChange, Self, ::VarGet() ) // ahora funciona a la perfeccion
endif // sin ocasionar problemas
**************
::oWnd:GoNextCtrl( ::hWnd )
return 0
else
if nKey == VK_TAB .and. GetKeyState( VK_SHIFT )
::oWnd:GoPrevCtrl( ::hWnd )
return 0
endif
endif
Espero esto sea de utilidad para aquellos que experimentan con esta clase.
Saludos |
ComboBox DropDown modificacion a clase | Puedes poner un pequeño ejemplo de implementacion para entender bien tu objetivo?
You can put a small example of implementation to better understand your goal? |
ComboBox DropDown modificacion a clase | static function AddModAlumno( oRec, lEmpty )
local oDlg, oBtn := Array(2), cTitle, cFoto, oFoto, lLic := .F.
IF( lEmpty,;
( cTitle := LoadString( , 10015 ), cFoto := cDirImg+"Foto.png" ),;
( cTitle := LoadString( , 10016 ), cFoto := cDirImg+"DSCN"+oRec:Foto+".jpg" ) )
IF !FILE( cFoto ) .or. EMPTY( oRec:Foto )
cFoto := cFoto := cDirImg+"Foto.png"
ENDIF
IF( oRec:NIvel_Escolar == "LICENCIATURA", lLic := .T., )
DEFINE DIALOG oDlg RESOURCE "DLGALU" TITLE cTitle PIXEL TRANSPARENT
REDEFINE GET oRec:Matricula ID 601 OF oDlg PICT "@!KS" UPDATE
REDEFINE GET oRec:Nombre ID 602 OF oDlg PICT "@!KS" UPDATE
REDEFINE GET oRec:Telefono ID 603 OF oDlg PICT "9999999999" UPDATE
REDEFINE GET oRec:CCT ID 604 OF oDlg PICT "@!KS" UPDATE
REDEFINE COMBOBOX oRec:Nivel_Escolar ITEMS aNivelEsc ID 605 OF oDlg // Aquí, despliega una lista, que tiene búsqueda incremental, cuando se presiona
// RETURN, evalúa el WHEN y salta dos controles del dialogo, sin permitir
// la selección del COMBOBOX donde se evalúa el WHEN. Con la modificación
// en la clase COMBOBOX, ahora trabaja perfectamente. Obvio deberá configurar
// el bChange del control. Lineas adelante se muestra como.
REDEFINE COMBOBOX oRec:Licenciatura ITEMS aLic ID 606 OF oDlg WHEN oRec:Nivel_Escolar == "LICENCIATURA" // Evalúa un WHEN
REDEFINE COMBOBOX oRec:Grado ITEMS aGrado ID 607 OF oDlg
REDEFINE COMBOBOX oRec:Grupo ITEMS aGrupo ID 608 OF oDlg
REDEFINE COMBOBOX oRec:Turno ITEMS aTurno ID 609 OF oDlg
REDEFINE CHECKBOX oRec:Cenlex ID 610 OF oDlg UPDATE
REDEFINE GET oRec:Cuenta_Cenlex ID 611 OF oDlg PICT "@!KS" UPDATE WHEN oRec:Cenlex
REDEFINE GET oRec:Beca ID 612 OF oDlg PICT "999" UPDATE
REDEFINE GET oRec:Descuento ID 613 OF oDlg PICT "999" UPDATE
REDEFINE COMBOBOX oRec:Estado ITEMS aEstado ID 614 OF oDlg
REDEFINE GET oRec:Foto ID 615 OF oDlg PICT "9999" UPDATE VALID( oRec:Foto := StrZero( Val( oRec:Foto ), 4, 0 ), oDlg:UpDate(), .T. )
REDEFINE IMAGE oFoto ID 616 OF oDlg FILE cFoto ADJUST
oFoto:Progress( .F. )
REDEFINE BTNBMP oBtn[1] WHEN oRec:Modified() RESOURCE "ACEPTAR" ID 617 OF oDlg ;
ROUND NOBORDER TRANSPARENT PROMPT "Aceptar" LEFT ;
ACTION ( oRec:Elaboro := AllTrim( cLogin ), oRec:Fecha_Hora := DateTime() ,oRec:Save(), oDlg:End() ) TOOLTIP { "Guardar" }
REDEFINE BTNBMP oBtn[2] RESOURCE "CANCELAR" ID 618 OF oDlg ;
ROUND NOBORDER TRANSPARENT PROMPT "Cancelar" LEFT ;
ACTION oDlg:End() TOOLTIP { "Cancelar" }
oDlg:lHelpIcon := .F.
AEval( oDlg:aControls, { |o| IF( o:ClassName == "TCOMBOBOX",;
( o:lIncSearch := .T., o:lCaseSensitive := .T. ),;
( o:nClrText := CLR_BLUE, o:nClrPane := nRGB( 0xFE, 0xFF, 0xDB ) ) ) } )
oDlg:aControls[5]:bChange := { || oRec:Nivel_Escolar := oDlg:aControls[5]:oGet:GetText(), oDlg:AEvalWhen(), oDlg:Update() } // Aquí como se realiza el bChange del control.
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------// |
ComboBox GetKeyChar() Method | Hi All,
I noticed that TComboBox:nAt is not updated when GetKeyChar() hit a match ...
It would be handy though ...
So when user press char in oCbx:oGet and hit a match, we can retrieve other info relative to oCbx:nAt from another array...
Like 'name' in oCbx:aItem to var1 and aAddr[ oCbx:nAt ] to var2 and so on ...
Any thoughts <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
ComboBox GetKeyChar() Method | I added and tested this lines which serves the purpose..
i dunno if I made it right or any other ways so I can avoid modifying the original ComboBox source if any? ... I mean, I tried several ways as well..
[url=http://s208.photobucket.com/user/fraxzi/media/FWxHarbour/TComboBox_Mod_zps7z7l68bg.jpg.html:wcvbrkb5][img:wcvbrkb5]http://i208.photobucket.com/albums/bb82/fraxzi/FWxHarbour/TComboBox_Mod_zps7z7l68bg.jpg[/img:wcvbrkb5][/url:wcvbrkb5]
Anyone with better idea <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
ComboBox GetKeyChar() Method | Much better ...
[code=fw:gpw53fgx]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br /> <span style="color: #00C800;">If</span> ::<span style="color: #000000;">bChange</span> <> <span style="color: #00C800;">NIL</span> <br /> ::<span style="color: #0000ff;">Select</span><span style="color: #000000;">(</span> nAt <span style="color: #000000;">)</span> <br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span>, ::<span style="color: #000000;">VarGet</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> End<br />...<br /> </div>[/code:gpw53fgx] |
ComboBox Refresh | Hi All,
How can I refresh the display and list of a combobox once it`s content has changed ? <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
Regards,
Gilbert |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.