Alpha Video Training
Results 1 to 3 of 3

Thread: adding right-click menu to an Image Reference Field

  1. #1
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    795

    Default adding right-click menu to an Image Reference Field

    I am trying to add custom right-click-menus to some image reference fields on a form, using the code suggested by Selwyn:
    Quote Originally Posted by Selwyn Rabins View Post
    You can do it, but it requires xbasic.
    You will have to put code in the form's OnInit event.

    say that the object name of the image field is 'bmp'.

    You would need to add this code in the form's OnInit event:
    Code:
    :topparent:Bmp.Property_Add("right_click_menu")
    :topparent:Bmp.right_click_menu = "TheNameOfYouMenu"
    I added the code to the OnInit event on my form as follows

    :topparent:Markings1_file.Property_add("right_click_menu")
    :topparent:Markings1_file.right_click_menu = "appendix_c_photo_menu"
    where marking1_file is an image reference field on my form.

    when I initialise the form I get the following error message:

    Script:OnInit line:9
    :topparent:Markings1_file.Property_add("right_click_menu")
    Argument is incorrect data type
    can anyone tell me what I am doing wrong compared to the original code as supplied by Selwyn?
    Last edited by Graham Wickens; 10-31-2009 at 07:16 AM. Reason: Spelling!
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  2. #2
    Member
    Real Name
    Pete Whittet
    Join Date
    Sep 2007
    Location
    UK
    Posts
    132

    Default Re: adding right-click menu to an Image Reference Field

    Hi Graham,

    I couldn't get the XBasic code working either - same results as you. No idea why it doesn't work.

    However, if you bring up the properties of the image ref field, and click the "Menus/Toolbars" tab, you can select your custom menu from the drop-down "Right-Click Menu" box. It worked for me !

    Pete

  3. #3
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    795

    Default Re: adding right-click menu to an Image Reference Field

    Hi Pete,

    thanks you have solved my problem, trying to make the solution to difficult as usual! :o
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

Similar Threads

  1. Image Reference Field Vs Jpeg Image Field
    By reynolditpi in forum Alpha Five Version 8
    Replies: 1
    Last Post: 06-18-2007, 01:07 PM
  2. Image File Reference Field
    By gloala in forum Alpha Five Version 7
    Replies: 2
    Last Post: 06-29-2006, 02:19 PM
  3. image file reference right click menu
    By Cheryl Lemire in forum Alpha Five Version 7
    Replies: 4
    Last Post: 04-11-2006, 03:10 PM
  4. Image Reference Field Problem
    By Howard G. Cornett in forum Web Application Server v7
    Replies: 9
    Last Post: 04-11-2006, 01:06 PM
  5. Image Reference Field not clearing?
    By glenschild in forum Alpha Five Version 5
    Replies: 4
    Last Post: 07-25-2002, 08:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •