Page 2 of 3

Re: A better Listbox/Combobox

Posted: Tue Nov 12, 2013 6:56 pm
by tonton2
Voici un exemple de Grigory FILATOV que j'ai transformé , que je voudrais mettre dans la grille de l'exemple cité plus haut

Here is an example of Grigory FILATOV I transformed, I would like to put in the grid

Re: A better Listbox/Combobox

Posted: Tue Nov 12, 2013 8:04 pm
by serge_girard
Youcef,


Merci d'avoir partager l'exemple!


Serge/Belgique

Re: A better Listbox/Combobox

Posted: Tue Nov 12, 2013 8:29 pm
by tonton2
serge_girard wrote:Youcef,


Merci d'avoir partager l'exemple!


Serge/Belgique
pas de quoi mon ami, je vais mettre bientôt une gestion complète d'une entreprise

Re: A better Listbox/Combobox

Posted: Tue Nov 12, 2013 8:32 pm
by Javier Tovar
Merci pour le partage tonton2 :D

Re: A better Listbox/Combobox

Posted: Wed Nov 13, 2013 4:06 pm
by tonton2
Bonsoir,
cet exemple donne le même résultat que précédemment en utilisant l'option "SORT .T.
bonne suite a tous

Code: Select all

/*

   The same result is obtained with the option "SORT. T."
   ==> Explanation :you enter the first letter followed by the 2nd etc. ..  

*/

#include "minigui.ch"
static  aRefProduit := {} 
  
Procedure Main
use constart new
do while !eof()
      aadd(aRefProduit, CONSTART->REFERENCE)
      skip
   enddo
 
   DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 400 ;
      HEIGHT 200 ;
      TITLE 'ComboBox Demo' ;
      MAIN 
/*
      DEFINE MAIN MENU
         DEFINE POPUP 'Test'
            MENUITEM 'Get Value for Combo_2' ACTION MsgInfo(Str(Form_1.Combo_2.Value))
            MENUITEM 'Set Value for Combo_2' ACTION Form_1.Text_2.Value := '1'
         END POPUP
      END MENU
*/
 DEFINE COMBOBOX combo_1
      ROW     40
      COL     160
      VALUE    1
      ITEMS aRefProduit 
      SORT .T.  // it's here the OPTION
   END COMBOBOX
 
/*
      @ 10,160 COMBOBOX combo_1 ;
         ITEMS aRefProduit ;
        value 1
       SORT .T.  
      
      @ 40,160 TEXTBOX Text_2 VALUE '' UPPER  ;
      ON CHANGE Form_1.combo_1.Value := ComboSearch(aRefProduit,Form_1.Text_2.Value)
*/
   END WINDOW

   CENTER WINDOW Form_1

   ACTIVATE WINDOW Form_1

Return

/*
Function ComboSearch( aArray, cValue )
Local nPos

   nPos := Ascan(aArray, {|x| SubStr(x, 1)  = cValue})

Return nPos 
*/

Re: A better Listbox/Combobox

Posted: Mon Nov 18, 2013 9:21 pm
by tonton2
Avant tout je remercie toute l'equipe de HMG et en particulier Mr ESGICI pour son aide et sa disponibilité sans faille.
Pour avoir realiser ce petit programme de facturation qui n'est qu'une partie de mon programme de GESTION , j'ai du copier et changer plusieures parties de vos exemples sans votre autorisation.
et je m'en execuse auprés de vous tous.
Merci
à l'ouverture le choix du client se fait par soit par un numéro de code ou d'une succesion de lettres(COMBOSEARCHGRID).
ensuite une facture est créee avec derniere facture +1.
la tva est de 0=>40 modifiable.
"INS" sert a ajouter les articles.
"SUPPR" a supprimer la ligne de la grille.
le choix du produit se fait par un combobox.
la designation et le prix de reference ne change pas,mais le prix unitaire doit etre inscrit.
Ma question est il possible de changer COMBOBOX dans la grille par une autre methode pour trouver la reference en tapant les lettres la composant , tout en gardant le meme principe a savoir
REFERENCE==>DESIGNATION==>PRIX UNITAIRE.
la traduction a été faite par google et je m'en excuse car je maitrise trés mal l'Anglais.
Bonne continuation a tous.

First of all I thank the whole team of HMG and in particular Mr ESGICI for his help and seamless availability .
To realize this small invoicing program that is only part of my program MANAGEMENT , I can copy and change several parts of your examples without your permission.
and I execuse House nearby you all.
thank you
opening the customer's choice is made by either a code or a succesion of letters ( COMBOSEARCHGRID ) .
then an invoice is created with one last bill .
vat is 0 => 40 editable.
" INS" is used to add items .
" DELETE " to delete the row of the grid.
product selection is made by a combobox .
the designation and the reference price does not change, but the price must be registered .

My question is it possible to change COMBOBOX in the grid by another method to find the reference by typing the letters composing it , while keeping the same principle, namely
REFERENCE ==> PRODUCT ==> UNIT PRICE .

the translation was made by google and I apologize because I can speak very bad English.
Good luck to all.

Re: A better Listbox/Combobox

Posted: Mon Nov 18, 2013 10:02 pm
by danielmaximiliano
gracias por compartir Tonton

merci pour le partage Tonton

Re: A better Listbox/Combobox

Posted: Mon Nov 18, 2013 10:05 pm
by esgici
Salaam aleik Youcef

Thank you for sharing your work and nice words about me :)

Good work, nice implementation; congrats :arrow:

It's very nice, you had applied combo search grid to DBFNTX system successfully, thank and congrats again :)

maassalaam

Viva HMG :D

Re: A better Listbox/Combobox

Posted: Tue Nov 19, 2013 6:57 am
by mol
Fine work!
It looks it is what I was searching for :-D and I had no time to do it.

Regards, Marek

Re: A better Listbox/Combobox

Posted: Tue Nov 19, 2013 10:12 am
by bpd2000
Thank you for sharing
Regards