The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 GetNBox and list boxes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

additive

Germany
109 Posts

Posted - 04/01/2009 :  3:21:03 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
i'm looking for a simple list box control which allows the selection of several rows (and returns indices of the selected rows as vector<int> or at least can get the selection state of a specific row).
Can I get this into a GetNBox macro or do I have to create the whole UI using VisualC++? I found a lot of confusing named macros like List, Listbox, Multiline, StrList, Str_Group, but it seems none of these can do this. I don't want to use a combo box interface.

If such a resource isn't available can I add a flexGrid resource to a GetNBox tree?

It would be great if you could show me a way ...
Thanks,
Michael

kennyliu

3 Posts

Posted - 04/02/2009 :  06:14:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you are using a flexGrid control, this can be done by setting its selection related attributes to corresponding value, such as:


m_objActiveX.AllowSelection = true;
m_objActiveX.SelectionMode = flexSelectionListBox;


You can follow this sample step by step:

We may first learn about how to add an ActiveX control to a dialog:
http://wiki.originlab.com/~originla/wiki/index.php?title=Adding_an_ActiveX_Control_to_a_Dialog_Builder_Dialog_%28User-Interface_Development%29

Then, here's an tutorial about Programmatically Accessing a Dialog Builder Dialog with an ActiveX Control:
You can refer to http://wiki.originlab.com/~originla/wiki/index.php?title=Programmatically_Accessing_a_Dialog_Builder_Dialog_with_an_ActiveX_Control_%28User-Interface_Development%29

Open ActiveXDlgCls.h mentioned in that page in Code Builder , insert that two lines of code(in red and bold) right after the line
m_objActiveX = GetItem( IDC_AXD_VSFLEXGRID ).GetActiveXControl();

and add this line at the file header:
#include <vsFlexGrid.h>

Then it becomes multi-selectable after doing this.

Thanks,
Kenny

Edited by - kennyliu on 04/02/2009 06:26:06 AM
Go to Top of Page

additive

Germany
109 Posts

Posted - 04/02/2009 :  11:29:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kenny,

thank you for your quick answer!
I'm quite famliar using flexGrid but now I'm working with build-in GetNBox macros, which I prefer for smaller projects.

Now my question is whether it is possible to add such a list box into a GetNBox dialog? I didn't find any way but I think there should be one because this is a rather basic resource element (and radio box, multiline text, etc. work quite perfect).
Sorry for any inconvenience if my question wasn't clear.

Thanks,

Michael
Go to Top of Page

kennyliu

3 Posts

Posted - 04/02/2009 :  10:56:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Michael,

It's not supported to add such a list box into a GetNBox dialog currently, we have submitted a tracker now. (#13409 Need GETN marco to support multiple selectable list table box)

Thanks,
Kenny
Go to Top of Page

additive

Germany
109 Posts

Posted - 04/03/2009 :  12:26:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That would be really great!
Thanks!
-Michael
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000