C++: Cannot access Y and Z of a point in a dialogbox


I want to know if this is a bug or if I’m doing something wrong.

I create a new instance of CRhinoUiOptionsListCtrlPointEditBox, and then I use .SetPoint(double, double,double).

Then I add the item to a ConfigurationCtrl, and I display it in a dialog box, and everything seems to work fine.

But anytime I try to access the instance of CRhinoUiOptionsListCtrlPointEditBox or the item in the ConfigurationCtrl, even immediately after initialized it, I have this bug:

If I use GetPoint() or if I access .x,.y,.z, they all have the same value, which is the .x one, even if y and z are displayed correctly in the dialog box.

This clearly seems a bug to me. Can anyone confirm it? Any way around it to access y and z?

Thank you.

I doubt its a bug, as we use this class in Rhino.

Have you seen this sample?


Perhaps it will help?

I learned to use these classes from the examples you linked, but I had some issues (for example, the modal class examples have no examples of the methods OnOK(), OnCancel(), and at first I didn’t think about searching for some examples on ANOTHER class…).

Here’s an example of code that replicates the bug, you should be able to copypaste it in any method and see the behavior, I wrote and tested this simple code just for showing it to you:

CRhinoUiOptionsListCtrlPointEditBox box;
if(box.GetPoint().x == box.GetPoint().y && box.GetPoint().y == box.GetPoint().z)


ConfigurationCtrl options;
ON_3dPoint point = ((CRhinoUiOptionsListCtrlPointEditBox*) (options.GetItem(0)))->GetPoint();
if(point.x == point.y && point.y == point.z)

//Also if I use GetPoint(&double,&double,&double):

double a,b,c;
((CRhinoUiOptionsListCtrlPointEditBox*) (options.GetItem(0)))->GetPoint(a,b,c);
if(a == b && b == c)

Of course, they all print “equal”.

I tried printing their values too, and their values are all equal the X value, no matter what I do.

If I’m doing something wrong, I don’t know what it is.

Really, thank you for your help.

I just grepped thru the Rhino source, and I don’t see this class used anywhere. So (I guess) there are no guarantees it works.

If you look at the Properties panel, you can see what is uses 3 CRhinoUiOptionsListCtrlEditBox objects to represent x,y,z locations. Perhaps you can use this method?

Which method? CRhinoUiOptionsListCtrlPointEditBox::GetProperty()? If yes, which parameters should I use?


Like I said, instead of using a single CRhinoUiOptionsListCtrlPointEditBox object, use 3 CRhinoUiOptionsListCtrlEditBox objects…

I thought that with “method” you mean a method of the class…

Anyway, how can I put 3 CRhinoUiOptionsListCtrlEditBox in the same row?

You cannot. You’ll need to make something like this:

Or you will need to write your own property control…