popup of menu

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

popup of menu

Ton Kuypers-3
Hi,

In the "old days", when I didn't know better, I was using SuperCard.  
I seem to recall there was a possibility to popup menu's with a basic  
value...
What I mean is the user selected item 27 from a menu and the next  
time he opened the menu, the menu showed item 27 of the menu at the  
mouseposition.

I think the command was popup menu "XXX" at the topleft of me with  
fld "menuresult" (or something like that...)

In Revolution this works for a button of type "Option" but I need to  
use a regular pop-up button.

Anybody any suggestions?

Regards,


Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu

ScottR
Recently, Ton Kuypers  wrote:

> In the "old days", when I didn't know better, I was using SuperCard.
> I seem to recall there was a possibility to popup menu's with a basic
> value...
> What I mean is the user selected item 27 from a menu and the next
> time he opened the menu, the menu showed item 27 of the menu at the
> mouseposition.
>
> I think the command was popup menu "XXX" at the topleft of me with
> fld "menuresult" (or something like that...)
>
> In Revolution this works for a button of type "Option" but I need to
> use a regular pop-up button.
>
> Anybody any suggestions?

If I understand what you're asking, I believe you want the menuHistory
property.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: [hidden email]
W: http://www.tactilemedia.com

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Custom Properties Problem

David Burgun
Hi,

I have the following in a Stack Script:

function Initialize
set the customKeys of me to empty
end Initialize


on preOpenStack
get Initialize()
pass preOpenStack
end preOpenStack

I save and close the stack and then reopen it. The preOpenCard
handler runs but when I look at the custom properties of the stack in
the property inspector, they have not been deleted!

Am I doing something wrong?

I also tried the following in the message box:

set the customKeys of stack "StackX" to empty

And this didn't work either.

Thanks in advance
Dave

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Ton Kuypers-3
In reply to this post by ScottR
Scott,

MenuHistory is indeed is the function I need, but this doesn't work  
for buttons of type "popup".
Furthermore it is very strange that you would have to supply a number  
instead of the text selected...
I'm displaying data from a database, when a user clicks on a record  
he gets the data displayed and some of the data can be changed using  
pop-up menu's. So when a user clicks, I would first have to find the  
item in the list and set the menuhistory every time the user selects  
another record... Would be much easier when I could popup the menu  
with the text in a field...

If it would work for a regular pop-up menu :-(

Thanks anyway,


Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com



On 1-nov-05, at 15:57, Scott Rossi wrote:

> Recently, Ton Kuypers  wrote:
>
>
>> In the "old days", when I didn't know better, I was using SuperCard.
>> I seem to recall there was a possibility to popup menu's with a basic
>> value...
>> What I mean is the user selected item 27 from a menu and the next
>> time he opened the menu, the menu showed item 27 of the menu at the
>> mouseposition.
>>
>> I think the command was popup menu "XXX" at the topleft of me with
>> fld "menuresult" (or something like that...)
>>
>> In Revolution this works for a button of type "Option" but I need to
>> use a regular pop-up button.
>>
>> Anybody any suggestions?
>>
>
> If I understand what you're asking, I believe you want the menuHistory
> property.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> -----
> E: [hidden email]
> W: http://www.tactilemedia.com
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

David Burgun
Hi,

All you have to do is this:

function GetMenuItem theMenuItemName
put lineOffset(theMenuItemName,the text of button "popUp") into my myMenuItem
return myMenuItem



Then use it like this:

set the menuHistory of button "popUp" to GetMenuItem("TheMenuString")

All the Best
Dave


>Scott,
>
>MenuHistory is indeed is the function I need, but this doesn't work
>for buttons of type "popup".
>Furthermore it is very strange that you would have to supply a
>number instead of the text selected...
>I'm displaying data from a database, when a user clicks on a record
>he gets the data displayed and some of the data can be changed using
>pop-up menu's. So when a user clicks, I would first have to find the
>item in the list and set the menuhistory every time the user selects
>another record... Would be much easier when I could popup the menu
>with the text in a field...
>
>If it would work for a regular pop-up menu :-(
>
>Thanks anyway,
>
>
>Ton Kuypers
>Digital Media Partners bvba
>Tel. +32 (0)477 / 739 530
>Fax +32 (0)14 / 71 03 04
>http://www.dmp-int.com
>
>
>
>On 1-nov-05, at 15:57, Scott Rossi wrote:
>
>>Recently, Ton Kuypers  wrote:
>>
>>>In the "old days", when I didn't know better, I was using SuperCard.
>>>I seem to recall there was a possibility to popup menu's with a basic
>>>value...
>>>What I mean is the user selected item 27 from a menu and the next
>>>time he opened the menu, the menu showed item 27 of the menu at the
>>>mouseposition.
>>>
>>>I think the command was popup menu "XXX" at the topleft of me with
>>>fld "menuresult" (or something like that...)
>>>
>>>In Revolution this works for a button of type "Option" but I need to
>>>use a regular pop-up button.
>>>
>>>Anybody any suggestions?
>>>
>>
>>If I understand what you're asking, I believe you want the menuHistory
>>property.
>>
>>Regards,
>>
>>Scott Rossi
>>Creative Director
>>Tactile Media, Multimedia & Design
>>-----
>>E: [hidden email]
>>W: http://www.tactilemedia.com
>>
>>_______________________________________________
>>use-revolution mailing list
>>[hidden email]
>>Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>>http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>_______________________________________________
>use-revolution mailing list
>[hidden email]
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Custom Properties Problem

Eric Chatonet
In reply to this post by David Burgun
Hi Dave,

1. Put your initialization into an openStack handler, not a  
preOpenStack handler to make it working.
2. A function is supposed to return a result: a handler might be more  
appropriate here ;-)

on Initialize
   set the customKeys of me to empty -- of this stack
end Initialize

on openStack
   Initialize
   pass openStack
end openStack

Best Regards from Paris,

Eric Chatonet.

Le 1 nov. 05 à 16:22, David Burgun a écrit :

> Hi,
>
> I have the following in a Stack Script:
>
> function Initialize
> set the customKeys of me to empty
> end Initialize
>
>
> on preOpenStack
> get Initialize()
> pass preOpenStack
> end preOpenStack
>
> I save and close the stack and then reopen it. The preOpenCard  
> handler runs but when I look at the custom properties of the stack  
> in the property inspector, they have not been deleted!
>
> Am I doing something wrong?
>
> I also tried the following in the message box:
>
> set the customKeys of stack "StackX" to empty
>
> And this didn't work either.
>
> Thanks in advance
> Dave

----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Ton Kuypers-3
In reply to this post by David Burgun
Dave,

That is something I already implemented, right after Scott Rossi's  
suggestion...

But the problem is that menuHistory doesn't work for buttons with the  
menu type "Pop Up" :-((

Ton



On 1-nov-05, at 17:06, David Burgun wrote:

> Hi,
>
> All you have to do is this:
>
> function GetMenuItem theMenuItemName
> put lineOffset(theMenuItemName,the text of button "popUp") into my  
> myMenuItem
> return myMenuItem
>
>
>
> Then use it like this:
>
> set the menuHistory of button "popUp" to GetMenuItem("TheMenuString")
>
> All the Best
> Dave
>
>
>
>> Scott,
>>
>> MenuHistory is indeed is the function I need, but this doesn't  
>> work for buttons of type "popup".
>> Furthermore it is very strange that you would have to supply a  
>> number instead of the text selected...
>> I'm displaying data from a database, when a user clicks on a  
>> record he gets the data displayed and some of the data can be  
>> changed using pop-up menu's. So when a user clicks, I would first  
>> have to find the item in the list and set the menuhistory every  
>> time the user selects another record... Would be much easier when  
>> I could popup the menu with the text in a field...
>>
>> If it would work for a regular pop-up menu :-(
>>
>> Thanks anyway,
>>
>>
>> Ton Kuypers
>> Digital Media Partners bvba
>> Tel. +32 (0)477 / 739 530
>> Fax +32 (0)14 / 71 03 04
>> http://www.dmp-int.com
>>
>>
>>
>> On 1-nov-05, at 15:57, Scott Rossi wrote:
>>
>>
>>> Recently, Ton Kuypers  wrote:
>>>
>>>
>>>> In the "old days", when I didn't know better, I was using  
>>>> SuperCard.
>>>> I seem to recall there was a possibility to popup menu's with a  
>>>> basic
>>>> value...
>>>> What I mean is the user selected item 27 from a menu and the next
>>>> time he opened the menu, the menu showed item 27 of the menu at the
>>>> mouseposition.
>>>>
>>>> I think the command was popup menu "XXX" at the topleft of me with
>>>> fld "menuresult" (or something like that...)
>>>>
>>>> In Revolution this works for a button of type "Option" but I  
>>>> need to
>>>> use a regular pop-up button.
>>>>
>>>> Anybody any suggestions?
>>>>
>>>>
>>>
>>> If I understand what you're asking, I believe you want the  
>>> menuHistory
>>> property.
>>>
>>> Regards,
>>>
>>> Scott Rossi
>>> Creative Director
>>> Tactile Media, Multimedia & Design
>>> -----
>>> E: [hidden email]
>>> W: http://www.tactilemedia.com
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your  
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Custom Properties Problem

David Burgun
In reply to this post by Eric Chatonet
Hi,

Actually I had to move the preOpenStack handler into the script of card 1.

Sorry, the real function does return a value, I just cut all the
unecessary code out for posting on the list.

I think what was happening was that the wrong stack was being
operated on in the preOpenStack handler. I think that "me" was
refering to the stack that caused the stack in question to open.

The problem with using "this stack" apposed to "me" is that if a
handler is called from another stack then "this stack" refers to the
calling stack. I use "me" to refer to the stack that the code is
running in as per the docs. Is this correct?

Seems to work now I have put it into the card script.

All the Best
Dave


>Hi Dave,
>
>1. Put your initialization into an openStack handler, not a
>preOpenStack handler to make it working.
>2. A function is supposed to return a result: a handler might be
>more appropriate here ;-)
>
>on Initialize
>   set the customKeys of me to empty -- of this stack
>end Initialize
>
>on openStack
>   Initialize
>   pass openStack
>end openStack
>
>Best Regards from Paris,
>
>Eric Chatonet.
>
>Le 1 nov. 05 à 16:22, David Burgun a écrit :
>
>>Hi,
>>
>>I have the following in a Stack Script:
>>
>>function Initialize
>>set the customKeys of me to empty
>>end Initialize
>>
>>
>>on preOpenStack
>>get Initialize()
>>pass preOpenStack
>>end preOpenStack
>>
>>I save and close the stack and then reopen it. The preOpenCard
>>handler runs but when I look at the custom properties of the stack
>>in the property inspector, they have not been deleted!
>>
>>Am I doing something wrong?
>>
>>I also tried the following in the message box:
>>
>>set the customKeys of stack "StackX" to empty
>>
>>And this didn't work either.
>>
>>Thanks in advance
>>Dave
>
>----------------------------------------------------------------
>So Smart Software
>
>For institutions, companies and associations
>Built-to-order applications: management, multimedia, internet, etc.
>Windows, Mac OS and Linux... With the French touch
>
>Free plugins and tutorials on my website
>----------------------------------------------------------------
>Web site        http://www.sosmartsoftware.com/
>Email        [hidden email]/
>Phone        33 (0)1 43 31 77 62
>Mobile        33 (0)6 20 74 50 86
>----------------------------------------------------------------
>
>_______________________________________________
>use-revolution mailing list
>[hidden email]
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

David Burgun
In reply to this post by Ton Kuypers-3
Have you tried:

select line GetMeniItem("theMenuString") of me

This may work.
All the Best
Dave

>Dave,
>
>That is something I already implemented, right after Scott Rossi's
>suggestion...
>
>But the problem is that menuHistory doesn't work for buttons with
>the menu type "Pop Up" :-((
>
>Ton
>
>
>
>On 1-nov-05, at 17:06, David Burgun wrote:
>
>>Hi,
>>
>>All you have to do is this:
>>
>>function GetMenuItem theMenuItemName
>>put lineOffset(theMenuItemName,the text of button "popUp") into my myMenuItem
>>return myMenuItem
>>
>>
>>
>>Then use it like this:
>>
>>set the menuHistory of button "popUp" to GetMenuItem("TheMenuString")
>>
>>All the Best
>>Dave
>>
>>
>>>Scott,
>>>
>>>MenuHistory is indeed is the function I need, but this doesn't
>>>work for buttons of type "popup".
>>>Furthermore it is very strange that you would have to supply a
>>>number instead of the text selected...
>>>I'm displaying data from a database, when a user clicks on a
>>>record he gets the data displayed and some of the data can be
>>>changed using pop-up menu's. So when a user clicks, I would first
>>>have to find the item in the list and set the menuhistory every
>>>time the user selects another record... Would be much easier when
>>>I could popup the menu with the text in a field...
>>>
>>>If it would work for a regular pop-up menu :-(
>>>
>>>Thanks anyway,
>>>
>>>
>>>Ton Kuypers
>>>Digital Media Partners bvba
>>>Tel. +32 (0)477 / 739 530
>>>Fax +32 (0)14 / 71 03 04
>>>http://www.dmp-int.com
>>>
>>>
>>>
>>>On 1-nov-05, at 15:57, Scott Rossi wrote:
>>>
>>>>Recently, Ton Kuypers  wrote:
>>>>
>>>>>In the "old days", when I didn't know better, I was using SuperCard.
>>>>>I seem to recall there was a possibility to popup menu's with a basic
>>>>>value...
>>>>>What I mean is the user selected item 27 from a menu and the next
>>>>>time he opened the menu, the menu showed item 27 of the menu at the
>>>>>mouseposition.
>>>>>
>>>>>I think the command was popup menu "XXX" at the topleft of me with
>>>>>fld "menuresult" (or something like that...)
>>>>>
>>>>>In Revolution this works for a button of type "Option" but I need to
>>>>>use a regular pop-up button.
>>>>>
>>>>>Anybody any suggestions?
>>>>>
>>>>
>>>>If I understand what you're asking, I believe you want the menuHistory
>>>>property.
>>>>
>>>>Regards,
>>>>
>>>>Scott Rossi
>>>>Creative Director
>>>>Tactile Media, Multimedia & Design
>>>>-----
>>>>E: [hidden email]
>>>>W: http://www.tactilemedia.com
>>>>
>>>>_______________________________________________
>>>>use-revolution mailing list
>>>>[hidden email]
>>>>Please visit this url to subscribe, unsubscribe and manage your
>>>>subscription preferences:
>>>>http://lists.runrev.com/mailman/listinfo/use-revolution
>>>>
>>>
>>>_______________________________________________
>>>use-revolution mailing list
>>>[hidden email]
>>>Please visit this url to subscribe, unsubscribe and manage your
>>>subscription preferences:
>>>http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>
>>_______________________________________________
>>use-revolution mailing list
>>[hidden email]
>>Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>>http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>_______________________________________________
>use-revolution mailing list
>[hidden email]
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Chipp Walters
In reply to this post by Ton Kuypers-3
Maybe an option menu would work for you? It always displays the last
choice in it's label.

Or, take a look at putting !c before the line you wish selected in the
popup menu. This will create a check mark showing the user which is
selected.

The problem with popping it up over the 'default' or 'last selected'
value, is that a small move of the mouse changes what the user may
perceive as the default. So, the checkmark helps. For very long popup
menus (like a listing of fonts) it would be nice to have it popup over
the last selected value.

best,

Chipp


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Ton Kuypers-3
In reply to this post by David Burgun
:-(

Unless I misunderstood what you ment, it doesn't work...

I have a button on the card of type "pop up" named "TestMenu"
This button has got 10 lines of text, which creates a menu of 10 items.
I have one field on the card named "Test"

The button contains the following code:
     on mouseDown
       select line fGetMenuItem(fld "TestField") of me
     end mouseDown

     ON menupick vChoice
       put vChoice into fld "TestField"
       set the menuHistory of me to fGetMenuItem(fld "TestField")
     END menupick

     FUNCTION fGetMenuItem vMenuItemName
       put the text of button "TestMenu" into vMenuText
       put lineOffset(vMenuItemName,vMenuText) into vMenuItem
       return vMenuItem
     END fGetMenuItem

and the result: The menu just pops up with item 1 underneath the  
cursor :-(


Any more suggestions?

Ton


On 1-nov-05, at 18:03, David Burgun wrote:
Have you tried:

select line GetMeniItem("theMenuString") of me

This may work.
All the Best
Dave

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Custom Properties Problem

Eric Chatonet
In reply to this post by David Burgun
Hi Dave,

Perfect :-)

Le 1 nov. 05 à 18:02, David Burgun a écrit :

> The problem with using "this stack" apposed to "me" is that if a
> handler is called from another stack then "this stack" refers to the
> calling stack. I use "me" to refer to the stack that the code is
> running in as per the docs. Is this correct?

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

David Burgun
In reply to this post by Ton Kuypers-3
Just one more!

Try this:

       select line fGetMenuItem(fld "TestField") of the text of me

About 1000 to 1 odds on it working tho!

All the Best
Dave

>:-(
>
>Unless I misunderstood what you ment, it doesn't work...
>
>I have a button on the card of type "pop up" named "TestMenu"
>This button has got 10 lines of text, which creates a menu of 10 items.
>I have one field on the card named "Test"
>
>The button contains the following code:
>     on mouseDown
>       select line fGetMenuItem(fld "TestField") of me
>     end mouseDown
>
>     ON menupick vChoice
>       put vChoice into fld "TestField"
>       set the menuHistory of me to fGetMenuItem(fld "TestField")
>     END menupick
>
>     FUNCTION fGetMenuItem vMenuItemName
>       put the text of button "TestMenu" into vMenuText
>       put lineOffset(vMenuItemName,vMenuText) into vMenuItem
>       return vMenuItem
>     END fGetMenuItem
>
>and the result: The menu just pops up with item 1 underneath the cursor :-(
>
>
>Any more suggestions?
>
>Ton
>
>
>On 1-nov-05, at 18:03, David Burgun wrote:
>Have you tried:
>
>select line GetMeniItem("theMenuString") of me
>
>This may work.
>All the Best
>Dave
>
>_______________________________________________
>use-revolution mailing list
>[hidden email]
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Ton Kuypers-3
:-(

Not working either... I give up, will probably switch to another kind  
of menu...

Thanks anyway!

Ton

On 1-nov-05, at 18:25, David Burgun wrote:

> Just one more!
>
> Try this:
>
>       select line fGetMenuItem(fld "TestField") of the text of me
>
> About 1000 to 1 odds on it working tho!
>
> All the Best
> Dave
>
>
>> :-(
>>
>> Unless I misunderstood what you ment, it doesn't work...
>>
>> I have a button on the card of type "pop up" named "TestMenu"
>> This button has got 10 lines of text, which creates a menu of 10  
>> items.
>> I have one field on the card named "Test"
>>
>> The button contains the following code:
>>     on mouseDown
>>       select line fGetMenuItem(fld "TestField") of me
>>     end mouseDown
>>
>>     ON menupick vChoice
>>       put vChoice into fld "TestField"
>>       set the menuHistory of me to fGetMenuItem(fld "TestField")
>>     END menupick
>>
>>     FUNCTION fGetMenuItem vMenuItemName
>>       put the text of button "TestMenu" into vMenuText
>>       put lineOffset(vMenuItemName,vMenuText) into vMenuItem
>>       return vMenuItem
>>     END fGetMenuItem
>>
>> and the result: The menu just pops up with item 1 underneath the  
>> cursor :-(
>>
>>
>> Any more suggestions?
>>
>> Ton
>>
>>
>> On 1-nov-05, at 18:03, David Burgun wrote:
>> Have you tried:
>>
>> select line GetMeniItem("theMenuString") of me
>>
>> This may work.
>> All the Best
>> Dave
>>
>> _______________________________________________
>> use-revolution mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Martin Baxter-2
Ton,

Although you have given up, you might want to consider this, which seems
to work in a simple test stack.

The flimsy part of this is that you need to know the height of a
menuitem in your popup, and I don't know a way to get this
programmatically. I did a screenshot and measured it at 17 pixels on XP
here.

The offset of the popup topleft sets the last selection under the mouse
when the menu pops up, and I find that highlights it.

--card script
on mousedown
   put max(field "num",1) into tn
   popup btn "testpop" at mouseh()-8,(mousev()-8-((tn-1)*17))
end mousedown

--script of popup button "testpop"
on menupick
   put the menuhistory of me into field "num"
end menupick

## My test stack has a field "num" which holds the
## last menuhistory of btn "testpop"
## just for testing purposes of course

Martin Baxter

Ton Kuypers wrote:

> :-(
>
> Not working either... I give up, will probably switch to another kind  
> of menu...
>
> Thanks anyway!
>
> Ton
>
> On 1-nov-05, at 18:25, David Burgun wrote:
>
>> Just one more!
>>
>> Try this:
>>
>>       select line fGetMenuItem(fld "TestField") of the text of me
>>
>> About 1000 to 1 odds on it working tho!
>>
>> All the Best
>> Dave
>>
>>
>>> :-(
>>>
>>> Unless I misunderstood what you ment, it doesn't work...
>>>
>>> I have a button on the card of type "pop up" named "TestMenu"
>>> This button has got 10 lines of text, which creates a menu of 10  items.
>>> I have one field on the card named "Test"
>>>
>>> The button contains the following code:
>>>     on mouseDown
>>>       select line fGetMenuItem(fld "TestField") of me
>>>     end mouseDown
>>>
>>>     ON menupick vChoice
>>>       put vChoice into fld "TestField"
>>>       set the menuHistory of me to fGetMenuItem(fld "TestField")
>>>     END menupick
>>>
>>>     FUNCTION fGetMenuItem vMenuItemName
>>>       put the text of button "TestMenu" into vMenuText
>>>       put lineOffset(vMenuItemName,vMenuText) into vMenuItem
>>>       return vMenuItem
>>>     END fGetMenuItem
>>>
>>> and the result: The menu just pops up with item 1 underneath the  
>>> cursor :-(
>>>
>>>
>>> Any more suggestions?
>>>
>>> Ton
>>>
>>>
>>> On 1-nov-05, at 18:03, David Burgun wrote:
>>> Have you tried:
>>>
>>> select line GetMeniItem("theMenuString") of me
>>>
>>> This may work.
>>> All the Best
>>> Dave
>>>
>>> _______________________________________________

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: popup of menu (functionality not correct implemented...)

Ton Kuypers-3
Martin,

Interesting approach...
I will see if it is working in my app, thanks for the effort!

regards,

Ton Kuypers


On 1-nov-05, at 22:23, Martin Baxter wrote:

> Ton,
>
> Although you have given up, you might want to consider this, which  
> seems to work in a simple test stack.
>
> The flimsy part of this is that you need to know the height of a  
> menuitem in your popup, and I don't know a way to get this  
> programmatically. I did a screenshot and measured it at 17 pixels  
> on XP here.
>
> The offset of the popup topleft sets the last selection under the  
> mouse when the menu pops up, and I find that highlights it.
>
> --card script
> on mousedown
>   put max(field "num",1) into tn
>   popup btn "testpop" at mouseh()-8,(mousev()-8-((tn-1)*17))
> end mousedown
>
> --script of popup button "testpop"
> on menupick
>   put the menuhistory of me into field "num"
> end menupick
>
> ## My test stack has a field "num" which holds the
> ## last menuhistory of btn "testpop"
> ## just for testing purposes of course
>
> Martin Baxter
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution