HMGforum.com

Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
  1. HMG General Help • Re: tree -is it possible to change image?
    I found a bug and fully reported at: viewtopic.php?p=51101#p51101

    Statistics: Posted by Pablo César — Thu Apr 27, 2017 10:33 pm


  2. HMG General Help • Re: tree -is it possible to change image?
    Solved!
    For me the problem was to understand the image system of trees.
    When you define a tree you MUST give 2 images to NODEIMAGES and 2 images to ITEMIMAGES.
    Now you can add more images with AddImages.
    In the example of edk there are 6 images: "folder.gif", "folder_page.gif", "Page.gif", "page_next.gif" , "Page2.gif" and "page_next2.gif" in this order.
    Using "Form_1.Tree_1.ImageIndex(Form_1.Tree_1.Value):={5,5}" you give the image n. 5 (Page2.gif) to the item.
    Thanks to all!

    Statistics: Posted by giuper63 — Wed Apr 26, 2017 9:10 pm


  3. HMG General Help • Re: tree -is it possible to change image?
    Rathinagiri wrote:
    Tue Apr 25, 2017 1:52 pm
    I think we need a sample for implementation of hImageList also.
    It would be great ! :D

    But I think it would nothing happen if the TREE event is malfunctioning. :?

    I do not know if it happens only with me or it's a bug to recognize the "Selected item ID" (Tree Value property) at Expand and Collapse event.

    When I click to "+" it opens the subitems or clicking to "-" but I can not changes the image even if the images are predefined for the item.

    @ Dr. Claudio Soto:
    I saw the source code and I'm confused in this:
    Screen198.png
    I'm confused because I believe that in TVE_EXPAND and TVE_COLLAPSE events, it should update the TreeItem Value.

    Would you confirm if there is any reason for that or it's was just a mistake to change the value for Nil ?

    Statistics: Posted by Pablo César — Wed Apr 26, 2017 2:05 pm


  4. HMG General Help • Re: Problema onlostfocus/onenter
    For me, this sample works fine.

    CODE:

    #include <hmg.ch>Function Main   set navigation extended   define window main at 0, 0 width 400 height 300 main      define label text1label         row 10         col 10         width 100         value 'Text1'      end label      define textbox t1         row 10         col 110         width 200         value 'Some text'      end textbox         define label combo1label         row 40         col 10         width 100         value 'Combo1'      end label      define combobox c1         row 40         col 110         width 200         items { 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' }                  value 1         onlostfocus c1focuslost()      end combobox         define label text2label         row 70         col 10         width 100         value 'Text2'      end label      define textbox t2         row 70         col 110         width 200         value 'Some text'      end textbox      end window   main.center   main.activateReturnfunction c1focuslost   msginfo( 'Here' )return nil   

    Statistics: Posted by Rathinagiri — Wed Apr 26, 2017 4:41 am


  5. HMG General Help • Re: Problema onlostfocus/onenter
    Thanks for your help, I will send a sample today or tomorrow.
    best regards,
    Luis Vasquez.

    Statistics: Posted by luisvasquezcl — Wed Apr 26, 2017 12:51 am