Xojo Conferences
XDCMay2019MiamiUSA

DropDown menu in prop window (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Color Data
Next thread: Get properties in constructor


Re: class extensions...   -   Jan Erik Moström <
  DropDown menu in prop window   -   Alexander Cohen
   Re: DropDown menu in prop window   -   Christian Schmitz
    Re: DropDown menu in prop window   -   Alexander Cohen
     Re: DropDown menu in prop window   -   Alfred Van Hoek
      Re: DropDown menu in prop window   -   Alexander Cohen

DropDown menu in prop window
Date: 16.09.02 21:30 (Mon, 16 Sep 2002 16:30:09 -0400)
From: Alexander Cohen
Is it possible to have a DropDown menu in the properties window
somewhat like the frame property for a window has a dropDown from wich
to choose the type of frame?

Re: DropDown menu in prop window
Date: 16.09.02 23:41 (Tue, 17 Sep 2002 00:41:21 +0200)
From: Christian Schmitz
> Is it possible to have a DropDown menu in the properties window
> somewhat like the frame property for a window has a dropDown from wich
> to choose the type of frame?

At a property definition one of the latest values is a pointer to a list
of strings for those names.

Mfg
Christian

Re: DropDown menu in prop window
Date: 17.09.02 00:03 (Mon, 16 Sep 2002 19:03:27 -0400)
From: Alexander Cohen

On Monday, September 16, 2002, at 06:41 PM, Christian Schmitz wrote:

>> Is it possible to have a DropDown menu in the properties window
>> somewhat like the frame property for a window has a dropDown from wich
>> to choose the type of frame?
>
> At a property definition one of the latest values is a pointer to a
> list
> of strings for those names.
>
> Mfg
> Christian
>

It is not clear to me what you are trying to say! Do you mean i should
use the 2 last values of the REALproperty? Well, i tried that, and
nothing happened. Maybe someone from RS could answer my question since
you guys have done it in the past!

thanx,

Re: DropDown menu in prop window
Date: 17.09.02 01:48 (Mon, 16 Sep 2002 20:48:35 -0400)
From: Alfred Van Hoek
on 9/16/02 7:03 PM, Alexander Cohen at <email address removed> wrote:

> It is not clear to me what you are trying to say! Do you mean i should
> use the 2 last values of the REALproperty? Well, i tried that, and
> nothing happened. Maybe someone from RS could answer my question since
> you guys have done it in the past!

Yes, I hate this too when too short of an answer is given often;

Here it is, Andrew Barry once posted something like this to the list when I
asked a similar question.. (4 years ago..)

const char *centeredNames[] = { "kTopLeft",
"kLeft",
"kBottomLeft",
"kTop",
"kCentered",
"kBottom",
"kTopRight",
"kRight",
"kBottomRight"
};

extern REALcontrol GenericControl;

typedef struct GenericControlData {
REALpopupMenu myCenteredNames;
int myCenteredNameValue;
} GenericControlData;

static unsigned long
GenericControl_CenteredNamesGetter(REALcontrolInstance controlInstance,
long param)
{
ControlData(GenericControl, controlInstance, GenericControlData, me);

if ( REALinRuntime() )
return me->myCenteredNameValue;
return (unsigned long) me->myCenteredNames;
}

static void
GenericControl_CenteredNamesSetter(REALcontrolInstance controlInstance,
long param, unsigned long value)
{
ControlData(GenericControl, controlInstance, GenericControlData, me);
me->myCenteredNameValue = value;
me->myCenteredNames = (REALpopupMenu) value;
}


static REALproperty GenericControl_Properties[] = {

{ "PositionChild", "Centered", "integer", 0,
(REALproc)GenericControl_CenteredNamesGetter,
(REALproc)GenericControl_CenteredNamesSetter, 0, nil,
9, centeredNames },
};

Alfred

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: DropDown menu in prop window
Date: 17.09.02 01:55 (Mon, 16 Sep 2002 20:55:11 -0400)
From: Alexander Cohen
Now that's what i'm talking about! :) Thank a million, this is
something i can work with!