How to implement simple text GUI in Clipper/Harbour combining "select" fields and "input text" fields

451 views
Skip to first unread message

Uskerine

unread,
Oct 16, 2012, 4:38:09 PM10/16/12
to harbou...@googlegroups.com
Hi all,

I am trying to implement a basic Text GUI in Clipper/Harbour (console mode).
I have seen several examples for ACHOICE and SAY/GET, but I am looking to combine them to implement a basic form like in the attached screenshot.

Basically some fields will be "select" fields where user should select among different items (similar behaviour to ACHOICE)
and other fields are "input text" fields where user types information (GET).

Is there any example to combine them -again, console/text mode-?

Thanks in advance,


BasicForm.GIF

SD

unread,
Oct 17, 2012, 1:38:10 AM10/17/12
to harbou...@googlegroups.com
I am trying to implement a basic Text GUI in Clipper/Harbour (console mode).

 
Are you looking for some kind of Combo-box inputs for the selection fields? 
Combo-box inputs could be achieved even with pure Clipper coding. 

@ 06,10 say "<T>rade / <S>ample / <B>oth : " get mtype       COMBO {"T - Trade","S - Sample","B - Both"}
read
[ And for COMBO to take action, a separate routine is required]

Am not sure though of your requirement.....

Uskerine

unread,
Oct 17, 2012, 2:00:35 PM10/17/12
to harbou...@googlegroups.com
I found GET.. LISTBOX:

aciTREATMENT := {"Sr.","Sra.","Srta.","Don","-"}
@3,15,10,25 GET TREATMENT ;
        LISTBOX aciTREATMENT  DROPDOWN SCROLLBAR

To implement what I was looking for.
I will explore COMBO too, which are the differences between both?

Thanks,

SD

unread,
Oct 18, 2012, 1:45:01 AM10/18/12
to harbou...@googlegroups.com
On Wednesday, 17 October 2012 23:30:35 UTC+5:30, Uskerine wrote:
I found GET.. LISTBOX:
aciTREATMENT := {"Sr.","Sra.","Srta.","Don","-"}
@3,15,10,25 GET TREATMENT ;
        LISTBOX aciTREATMENT  DROPDOWN SCROLLBAR

I use Clipper 5.01 (and Harbour 3.0) and it doesn't have this feature. I've seen it in Clipper 5.3. Yes, you can use it in Harbour also.
 
To implement what I was looking for.
I will explore COMBO too, which are the differences between both?

The major difference between a COMBOBOX and LISTBOX are:

From a LISTBOX, you can only select from the list of choices available and cannot enter a new value in the get. Whereas in a COMBOBOX you have the option of selecting any item from the list and at the same time you can supply a value which is not available in the list.

In Visual Basic, Combobox is used for single selection, while listbox can be used for multiple selection. Not sure about this feature here in Harbour.

If you need, I can supply the source code for the combo routine. 

Regards,
Swapan

Uskerine

unread,
Oct 25, 2012, 2:10:19 AM10/25/12
to harbou...@googlegroups.com
Thanks for sharing,

LISTBOX definitively works fine for me in "Harbour 3.2.0dev":
ORDER_PRODUCT_OPTIONS := {"P10","P15","P20"}
@10,1 SAY "PEDIDO:"
@10,15,15,65 GET ORDER_PRODUCT LISTBOX ORDER_PRODUCT_OPTIONS DROPDOWN SCROLLBAR
I am now just trying to figure out how to change colors (but I did not actually play with that yet).

I don't need it right now, but it won't harm to have a COMBOBOX code example. I will probably need it in the future.

Thanks,
Reply all
Reply to author
Forward
0 new messages