Killing Things and Right Click Danglers. Fruitbat at work. lazarus / 8-Other ---------------------------------------------------------------------- SlackBrane · 2008-11-16 22:58 (http://www.overkill.talktalk.net/lazarus/pics/snapshot1.png) What I am trying to do is write something that lets me.... blarp blarp blarp. Well it's not thought out yet. However, at the end of the day I'm going to end up with a program where the user sets stuff up using bits placed in Panel1, on the left..... Of which there will be many. Unfortunately this means I might have to dribble about with setting up lots of 'versions' of Panel1 using the IDE and stuff or, cunning plan... I can write something that lets me design the bits needed with the bits they need, as a subset, whilst being able to 'ignore/kill' the bonus bits. Hence the piccy. It's a scratch but it has a Dangler.. bum, just checked, the Edit Box has a Dangler as well. I'm sure I have lost the plot but I would like to lose the Dangler and the other bobblers I may well be totally not bothered about but still come along when I create one. I'm sort of sure I don't need need the option for transliteration of whatever. I think I'll just top myself but before doing so I'll suggest that what I might have been looking for was a simple thing that did simple stuff with the opportunity to have a hint about the added complexity that might be available if..... I mean... No, I think I'll just top myself... I did think about......... But what's the point? I'd only.... That will be a stall. Bum ---------------------------------------------------------------------- SlackBrane · 2008-11-21 15:32 I realise I am not doing myself any favours here.. ... So, with cunning plan I found the 'PopUpMenu' thing and... that did not work. Well, it did in as much as I can bring up the one I made if I click on the right part of the control. Then... I found the 'OnContextPopup' event and redirected it to one of my of my own and... that did not work. Well, it did in as much as I can make Cell[1,3] say 'Plarp' if I click on the right part of the control. Unfortunately I'm still stuffed because if I right click on one of the Edit Cells it still brings up the 'System'(?) Popup menu and, whilst I might want the Cut Copy Paste stuff, or the user to have access to it, I don't want to give them a chance to fiddle about with or even see the bottom two in the piccy above. I'll guess, wrongly, it is buried somewhere in the inheritance of the Edit boxes that make up the control so I'll need to do something else that kills it that way.... I know I am not worthy but... any hints? (I hate myself already) ---------------------------------------------------------------------- SlackBrane · 2008-11-23 12:03 OK... I went back into Windows and tried this out in TurboDelphi? Unfortunately I can't give any pretty pictures, could be an advantage, since I can't ftp into my webspace at the moment. Anyway trying out the TStringGrid component in TurboDelphi produces different results in that when the component is placed then in the properties list I am able to associate my own PopupMenu with the control under 'Linkage', this is the same as with Lazarus. However in TurboDelphi when I switch to the events list there is also an entry under 'Linkage' for PopupMenu..., that is missing in Lazarus. Mind you I can believe I'm confusing myself here... In TurboDelphi if I associate the control with my own PopupMenu then that is the one that appears wherever I right click on the control even if it is one of the selected edit cells. In Lazarus if I associate the control with my own PopupMenu then if, for example, I have FixedRows or FixedColumns then right clicking on one of those areas brings up my PopupMenu. However if I right click on a selected cell, one being edited, then the 'System Popup', the one shown in the picture above, pops up. So... unless there is some other way of making things behave the way I would like them to then given the difference in behaviour between TurboDelphi and Lazarus I might almost feel the need to flag it as being either an inconsistency or a bug. Then again it might be a feature but it is one I could do without. Scratches head. I have tried the OnContextPopup and returned Handled := True; Unfortunately that kills my PopupMenu and the system one still insists on popping up. Grumble grumble. Does anyone else get this and, if it is a bug/inconsistency how would I go about reporting it? Thanks ---------------------------------------------------------------------- jesusr · 2008-11-24 15:30 please submit a bug report with a sample project at http://bugs.freepascal.org/main_page.php ---------------------------------------------------------------------- SlackBrane · 2008-11-25 17:29 OkeyBloke Just joined the bugs place so I'll have to go figure out how to do things right and then check myself before making an extreme/different idiot of myself. It's all new to me.