|
-
Dec 11th, 2000, 05:02 PM
#1
Thread Starter
Junior Member
Does any one know how to make a popup button appear right of an object that is clicked?
The following code makes the popup button appear just below the object that is clicked:
frmMenu = the form where the original menu has been placed
mnuFile = name of the menu that is going to be popped up
cmdFile = the command button to be pressed so the popup button appears
PopupMenu frmMenu.mnuFile, 0, cmdFile.Left, cmdFile.Top + cmdFile.Height
So again, if someone can be real helpful and tell me the code that can make the popup button appear just right of the cmdFile button when it is pressed.
Thank you. Also, if you can be so kind as to explain how one comes up with such numbers or ways to make it so I could make the popup button appear just up, left, diagonal whatever. But most importantly, I need the code to make it appear right of the command button. Thank you very much!
-
Dec 11th, 2000, 05:35 PM
#2
Lively Member
Hi,
To make it appear to the right of your button, you just need to add the width of your button to it's Left property.
Example:
Code:
PopupMenu frmMenu.mnuFile, 0, cmdFile.Left + cmdFile.Width, cmdFile.Top
To get it to appear elsewhere, you just need to play around with the left,top,width and height properties!
Hope this helps
Totally 
Using VS6,VC++6,VB6 SP4, Win2000 SP1, VS.Net Beta1, SQL Server 7.
-
Dec 11th, 2000, 05:37 PM
#3
_______
<?>
Code:
Private Sub Command1_Click()
'self explanatory...use the button's left plus it's widht to get to the right side
'then use the button's top plus it's height to get tot the bottom
PopupMenu smenu, 0, Command1.Left + Command1.Width, Command1.Top + Command1.Height
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|