Results 1 to 20 of 20

Thread: Right Clicking a TCheckBoxMenu item?

  1. #1
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default Right Clicking a TCheckBoxMenu item?

    I would like to be able to right click (or double click) an item in a TCheckBoxMenu so that I can have a picture show up.



    I want to, for example, right click Varrock East Trees and a menu come up saying "Locate on Map" or something, then when that's clicked, and image pops up.

    I've already looked at events for a TCheckBoxMenu and I can't seem to find anything that would work.

    Anyone have any idea?

  2. #2
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    I really can't help because i am very ill-informed about forms. however, i must say: If that's going to be the MSI form, it looks awesome!

  3. #3
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    I normally search out other forums for this kind of thing. I've been making a new Forms tut for a while now and most the data has come form other sites. Here is something that might work you'll have to check it out.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Err, does anyone remember what the problem i had a while back was with these? It was an error in simba, but i cant remember if it would applicable to this.

    Also, afaik there is an onmousedown which to my knowledge can be used to determine a right click. Then, i also think that there is a method to tell you which item is at a certain x,y. I will check now and edit if i find anything.

    EDIT: nvm, simba seems to be kind of limited in its on methods. you could use onclickitem, but to my knowledge, that is exactly the problem that I had before. And i dont think its been fixed.
    Last edited by Dan Cardin; 12-05-2010 at 04:52 PM.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by TomTuff View Post
    I really can't help because i am very ill-informed about forms. however, i must say: If that's going to be the MSI form, it looks awesome!
    Thanks. Hopefully we can get it done soon.

    Quote Originally Posted by Dan Cardin View Post
    EDIT: nvm, simba seems to be kind of limited in its on methods. you could use onclickitem, but to my knowledge, that is exactly the problem that I had before. And i dont think its been fixed.
    That's what I tried, and I kept getting an Out of range error. I still don't understand why.

    E: Thanks Brak, I'll check it out.

  6. #6
    Join Date
    Nov 2008
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That is a sexy form

    sorry to spam up this topic. but I was overcome by my attraction to that beautiful picture

  7. #7
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    yea, the bug was acknowledged, but
    mastaraymond (manager): Absolutely have no idea..
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  8. #8
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    yea, the bug was acknowledged, but
    Lol well the bitmap doesn't have to be shown, it would just be a nice feature, y'know? That way the users wouldn't have to check to forums if they're unsure where a script banks or something. I suppose if the form just included a link to the thread it would work just the same.

  9. #9
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    It really ought to work or else we'll need to do some weird things to get editing names and passwords done. Or we could ask the devs for a form component that is more like a tree checkbox thing, where you can have sections and checking a section checks eveything in that group of checkboxes. you know?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  10. #10
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    This bug is bothering me.. I looked in the source 100x times and my conclusion has to be FPC compiles it wrong. It should work
    Verrekte Koekwous

  11. #11
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Wouldn't that mean that it would be defective in all fpc things using tcheckboxlists?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  12. #12
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    Hmm Thought have you tried checking the box. Then using an onclick event to check what was checked to give the correct values to look for. Just a Thought.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

  13. #13
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    i dont understand what you mean.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  14. #14
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    It really ought to work or else we'll need to do some weird things to get editing names and passwords done. Or we could ask the devs for a form component that is more like a tree checkbox thing, where you can have sections and checking a section checks eveything in that group of checkboxes. you know?
    I was looking into that also because I wanted to use a tree setup. SCAR has TTreeView, but I couldn't figure out how to make it work. =\

    Quote Originally Posted by BraK View Post
    Hmm Thought have you tried checking the box. Then using an onclick event to check what was checked to give the correct values to look for. Just a Thought.

    ~BraK
    Do you mean use an OnChecked event to check which of the boxes on the list was checked? I suppose OnChecked, we could have the bitmap show, but that could be rather annoying. But again, there could be a Hide Bitmaps check box.

    @Ray, thanks for looking. If it just doesn't work, it doesn't work, we can find a way around it. ^^

  15. #15
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    if absolutely necessary we could try a timer. I would really rather not though.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  16. #16
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    if absolutely necessary we could try a timer. I would really rather not though.
    How would that work in this situation?

  17. #17
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    to my knowledge onclick(the one thats not items) works. So you see if the timer registers a click in sync with the checkboxlist, then if another occurs within a certain time, look at the currently selected item and display accordingly.

    For the other problem you could just continually check if the item selected changes and if so update the text.

    or you could use a similar thing for this. check if the selected on changes, then if within a certain time, the onclick of the checkboxlist goes off, but the item doesnt change, then do whatever it is that you wanted.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  18. #18
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    to my knowledge onclick(the one thats not items) works. So you see if the timer registers a click in sync with the checkboxlist, then if another occurs within a certain time, look at the currently selected item and display accordingly.

    For the other problem you could just continually check if the item selected changes and if so update the text.

    or you could use a similar thing for this. check if the selected on changes, then if within a certain time, the onclick of the checkboxlist goes off, but the item doesnt change, then do whatever it is that you wanted.
    There isn't an OnClick event for TCheckListBox.

  19. #19
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    To my knowledge onclickcheck is the same thing.

    Oh, woops. now i assume its for clicking the checkbox. huh. I. Erm...i cant think of a good way to do your problem without onclicks. The player editing selection thing could be fixed with timers. But if a general onclick could be implemented then we could at least do your thing, and mine wouldn't need timers.
    Last edited by Dan Cardin; 12-07-2010 at 07:20 PM.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  20. #20
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    To my knowledge onclickcheck is the same thing.

    Oh, woops. now i assume its for clicking the checkbox. huh. I. Erm...i cant think of a good way to do your problem without onclicks. The player editing selection thing could be fixed with timers. But if a general onclick could be implemented then we could at least do your thing, and mine wouldn't need timers.
    Yeah, as an alternative we could have a form pop up for player editing. Actually, the same could be done for adding a player. I'll think about that some more, see what I can come up with.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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