Ouvrir un buffer dans une liste box

mleclaire Messages postés 15 Date d'inscription vendredi 4 mars 2005 Statut Membre Dernière intervention 18 mars 2007 - 8 mars 2006 à 11:46
michelcreve Messages postés 13 Date d'inscription mardi 1 mars 2005 Statut Membre Dernière intervention 10 mars 2006 - 9 mars 2006 à 11:34
Je voudrait ouvrir les données que j'ai dans mon buffer pour les afficher dans ma listbox.

ListBox->Items->??;
apres je ne c pas comment afficher le buffer dedans.

merci d'avance pour vos reponse!!

2 réponses

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
8 mars 2006 à 12:06
Serait trop demander de préciser "(MonSimiliLangageInterprété)" dans la question quand c'est le cas !?!?

ciao...
http://dev.winsysdev.com
BruNews, MVP VC++
0
michelcreve Messages postés 13 Date d'inscription mardi 1 mars 2005 Statut Membre Dernière intervention 10 mars 2006
9 mars 2006 à 11:34
Salut, j'espère pouvoir t'apporter de la lumière à ton problème.
Voici un extrait de mon programme qui utilise listbox :

// -------------------
// Affichage Code Taux
// -------------------

private:
static String* tbl_Taux __gc[] = {S"001", S"003", S"005", S"007", S"008", S"011",
S"013", S"014", S"015", S"016", S"017", S"018", S"021", S"035", S"037", S"039"};
void Setup_Taux ()
{
type_Taux = new Label();
choixTaux = new ComboBox();

type_Taux->Location = Point(5, 200);
type_Taux->Size = System::Drawing::Size(100, 16);
type_Taux->Text = " Code Taux :";
type_Taux->TextAlign = ContentAlignment::MiddleRight;

choixTaux->DropDownWidth = 121;
choixTaux->Location = Point(110, 200);
choixTaux->Size = System::Drawing::Size(121, 21);
choixTaux->Text= Tbltemp[5];
for (int y=0; y<16; y++)
{
choixTaux->Items->Add((tbl_Taux[y]));
}

Controls->Add(type_Taux);
Controls->Add(choixTaux);

choixTaux->SelectedIndexChanged += new EventHandler(this,&CppForm::General_Clicked);
}

// ensuite la fonction General_Clicked

// -----------------------------------------------------------------------
// Si Selection OK general choisi, Rempli le tableau avec la valeur correspondante
// -----------------------------------------------------------------------

private:
static String* mem_rb3_rb4;

void General_Clicked(Object* pSender, EventArgs* pArgs)
{
// 1ere colone
if (pSender == rb1)
Tbltemp[0] = "C";
if (pSender == rb2)
Tbltemp[0] = "A";
if (pSender == choixTCN)
if (choixTCN->Text->Length > 0) Tbltemp[1] = choixTCN->SelectedItem->ToString();
if (pSender == choixDevise)
if (choixDevise->Text->Length > 0) Tbltemp[4] = choixDevise->SelectedItem->ToString();
if (pSender == choixTaux)
if (choixTaux->Text->Length > 0) Tbltemp[5] = choixTaux->SelectedItem->ToString();

etc....

Bon amusement...

Michel.
0
Rejoignez-nous