?
Solved

Using simple popup menu..

Posted on 2003-03-29
2
Medium Priority
?
821 Views
Last Modified: 2013-12-26
i have a menu as follows:
   m_category
      &Delete
      &Insert

I wanna using this menu as popup in my datawindow(dw_category1) which is in a tab object (tab_category.tab_page1)

following is my code in rbuttondown event of tab_category.tab_page1.dw_category1:
m_category.popmenu(PointerX(), PointerY())

following is the error message:
Null object reference in rbuttondown event of object dw_category1
0
Comment
Question by:peterdevadoss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
hink earned 60 total points
ID: 8229980
Declare an instance variable
m_category mymenu

In window open script (or treeview create script):
mymenu=create m_category

On rbuttondown will work fine your code:
mymenu.popmenu(PointerX(), PointerY())

A comment:
I usually create menu object level variables, that I set before, f.e.:
treeview tv

On rbuttondown You can write this:
mymenu.tv=this
mymenu.popmenu(PointerX(), PointerY())
0
 

Author Comment

by:peterdevadoss
ID: 8230423
thank you.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question