paar@bnrmtl.bnr.ca (A.E. Paar) (06/07/91)
I am having a problem with the way the XmList widget works using XmEXTENDED_SELECT. My problem is as follows, I build a list of XmString's based on a list of C++ objects, in the same window I have a couple of buttons that indicate an action to be taken on the selected items, how do I get back to my C++ object from the selected items? I'm using Motif 1.0. The most elaborate way I've tried to do it so far is to keep the address of each XmString of the list widget after its creation and then match the address of the selected ones after a button press. This doesn't work because the widget keeps a separate list of selected XmStrings (for which it allocates and deallocates space in memory as the selections progress, BTW does anyone know why it's done this way, I think it's sort of silly but I may be missing something). All the values that I'm talking about are fetched using XtGetValues for the XmNitems and XmNselectedItems. The only workaround that I've managed to implement is to use XmSINGLE_SELECT and use the item_position value in the XmListCallbackStruct in a singleSelectionCallback. Another problem with the XmList widget that I've encountered is that I haven't yet found a way of changing one character of an element in list from the code. The only thing that I've done so far is to delete the item at a given position, create a new XmString and insert it at the same position. Can anyone help me with these problems? ------------------------------------------------------------------- aep bnrmtl!paar@larry.mcrcim.mcgill.edu Augustin E. Paar Bell-Northern Research, Montreal, Quebec Opinions are my own and often not that of my management. -------------------------------------------------------------------
embarek@garland.UUCP (Embarek Chelalli) (06/13/91)
I have been using xview and c++. I am looking to use tele_use toolkit with motif widgets and C++. The application code will be developed in C++. I understand from you posting that you are already using C++ and motif. I am new to the motif and tele_use environment. 1. Please let me know how did you interface motif and C++ and send me some examples (if possible). 2. Is there any short falls in using motif and C++. 3. How does motif and devguide (xview toolkit compare). Many thanks Embarek Chellali email : embarek@garland.bt.co.uk