Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00022490
Message ID:
00022642
Vues:
37
>>>>I have a drop down combo box that is a list of printers. I use APRINTERS() to populate the box and allow users to add printers if they want. The valid of the combo is:
>>>>
>>>>IF !(this.DisplayValue == this.Value)
>>>> this.AddItem(this.DisplayValue)
>>>> this.Value = this.ListItem[this.NewItemID, this.BoundColumn]
>>>>ENDIF
>>>>
>>>>When I test it I have the following options:
>>>>
>>>> Dot Matrix
>>>> HP LaserJet 5/5M - Standard
>>>> \Nextgen\hp5
>>>>
>>>>Everything works great and I can add printers ok, BUT...
>>>>
>>>>If I select \Nextgen\hp the 1st backslash goes way and Nextgen\hp5 is added to the list, but it's disabled. Then if I select \Next... again, again, the bs goes away and another, duplicate, Nextgen... is added to the list.
>>>>
>>>>BTW InputMask = K and format is X.
>>>>
>>>>Any ideas?
>>>>
>>>>Thanks
>>>
>>>That's funny, but combobox understand a item started with "\" as disabled. You can avoid it if change RowSource (just Value will invoke the problem). Use Cursor as RowSource, and Insert Into Cursor to get new combo item.
>>
>>
>>I've been having a problem with Insert Into Cursor. If I use the Insert Into command I get Cannot update the cursor (of course, it's read only) and I cannot find help on how INSERT INTO CURSOR and I don't know how to make a cursor updateable.
>>
>>Thanks.
>
>If you make a copy of your cursor it will not be read-only. Just
> USE mycursor AGAIN in 0 ALIAS newcursor
>
>By the way, is there a better way of saying "not read-only"? It sounds awkward...
>
>Barbara

That's right, but I prefer to use CREATE CURSOR command and this cursor is updatable.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform