Combo Box edit/delete

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

RPC
Posts: 127
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 30 times
Been thanked: 7 times

Combo Box edit/delete

Post by RPC » Thu Feb 15, 2018 8:25 am

Hi all
I want to edit/delete items from combo box. Can anyone point to how this can be done.
I have used Esgici's DynamicCombobox program to enter items in Combo box. Thanks Esgici.
I need to edit or delete certain items from the list.
Can anyone help please.
Thank you

User avatar
Rathinagiri
Posts: 5210
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 155 times
Been thanked: 144 times
Contact:

Post by Rathinagiri » Thu Feb 15, 2018 11:52 am

Any item can be changed in the runtime using the following statement:

form_name.comboboxname.item( n ) := 'New Item'
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

RPC
Posts: 127
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 30 times
Been thanked: 7 times

Post by RPC » Thu Feb 15, 2018 1:53 pm

Thanks for the reply Rathinagiri.
The item of the combobox will be changed by user,so how to know which item no was changed or deleted ?

User avatar
luisvasquezcl
Posts: 1077
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 12 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Thu Feb 15, 2018 1:54 pm

Dear
I think it's not the proper control to do that kind of operations.
best regards,
Luis Vasquez

RPC
Posts: 127
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 30 times
Been thanked: 7 times

Post by RPC » Thu Feb 15, 2018 2:02 pm

For eg consider the enclosed program.
If I change "C" to "K" it does not change instead it adds "K" as another item.
Similarly deleting "C" does not delete it. It still has same items.
Pls have a look
Thanks
Attachments
MyDCB.rar
(926 Bytes) Downloaded 28 times

RPC
Posts: 127
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 30 times
Been thanked: 7 times

Post by RPC » Thu Feb 15, 2018 2:04 pm

luisvasquezcl wrote:
Thu Feb 15, 2018 1:54 pm
Dear
I think it's not the proper control to do that kind of operations.
best regards,
Luis Vasquez
Thanks Luis for your reply
Can you suggest an alternative.
Thanks

User avatar
luisvasquezcl
Posts: 1077
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 12 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Thu Feb 15, 2018 4:09 pm

Dear RPC,
I think a listbox or a grid can be the controls indicated for the type of operation you want to perform.
Best regards,

User avatar
andyglezl
Posts: 932
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 13 times
Been thanked: 36 times
Contact:

Post by andyglezl » Thu Feb 15, 2018 4:19 pm

Hi RPC

Maybe this can help...

viewtopic.php?f=5&t=5433&p=53081#p53081
Andrés González López
Desde Guadalajara, Jalisco. México.

RPC
Posts: 127
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 30 times
Been thanked: 7 times

Post by RPC » Fri Feb 16, 2018 7:51 am

luisvasquezcl wrote:
Thu Feb 15, 2018 4:09 pm
Dear RPC,
I think a listbox or a grid can be the controls indicated for the type of operation you want to perform.
Best regards,
Hi Luis
List box doesn't allow for adding of items by user.
My combobox is part of a form and grid is a separate window so cant use grid.
Thanks though, for suggestion.

RPC
Posts: 127
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 30 times
Been thanked: 7 times

Post by RPC » Fri Feb 16, 2018 7:53 am

andyglezl wrote:
Thu Feb 15, 2018 4:19 pm
Hi RPC

Maybe this can help...

viewtopic.php?f=5&t=5433&p=53081#p53081
Thanks Andyglezi for the link but it relates to grid and grid is not appropriate for me as it opens in new window.

Post Reply