Jump to content
Developer Wiki and Function Reference Links ×

PIO with Buttons


J. Miller

Recommended Posts

Okay, I almost put a brick through the monitor.

I have a PIO that utilizes a button to call a dialog that has a GetColorChoice Control in it. Through the mysteries of enabling and setting the VSO calls i got it to display and retrieve a color... BUT in the case statement that builds the pio i can either build the pio with the (3) case or pick the color with the (35) case. when i want to change the color of a handled object (outside of the case... is this wrong???) I either get the handle of the object or the color integer. I can't get both.

What am i doing wrong??

I have been on many sites today to try to get a grip on vso things, but cant seem to find what the 'theevent' indexes are or could be. lost lost lost

Sample....

BEGIN

isObject := GetCustomObjectInfo(objectName, objectHan, recordHan, wallHan);

vsoGetEventInfo(theEvent, theMessage );

CASE theEvent OF

3:

BEGIN

Build the PIO Stuff

{hanFill is created in the pio stuff}

END;

5: {kObjOnInitXProperties}

BEGIN

result := SetObjPropVS(8, TRUE);

result := vsoInsertAllParams;

result := vsoInsertWidget(2,12, 15, 'Change 2D Symbol Color', 0);

END;

35:

BEGIN

ReturnColorDialog; {Custom Dialog to pick Color}

AlrtDialog(Concat(' handle to Fill', hanFill, ' newColor ' , newColor));

{Returns color but not handle of hanFill}

END;

END; {of Case}

AlrtDialog(Concat(' handle to Fill', hanFill, ' newColor ' , newColor));

{Returns HanFill but not Color}

END;

Link to comment

Jeff -

You might want to try...:

- Create hidden OIP parameters to hold color info (a color index, 3 seperate RGB parameters, or a single parameter from which you parse RGB integers).

- Build the PIO geometry based on those hidden color parameters.

- When you OK out of the color-changing dialog, write the chosen color info to those hideen parameters.

- Reset the PIO after exiting the dialog. This will cause the PIO to be regenerated using the new color.

Make sense??

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...