Split Box Grid Control on DblClick error

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
jayadevu
Posts: 240
Joined: Tue May 19, 2009 7:10 am

Split Box Grid Control on DblClick error

Post by jayadevu »

Hi All,
In the following code, on Dblclick on Grid item error is generated. Pls help.

Code: Select all

 #include "minigui.ch"

FUNCTION TestGridinSplitBox
   local ADIR := Directory()
   DEFINE WINDOW FrmMain At 0,0 Width 640 Height 480 Main
   DEFINE SPLITBOX
      DEFINE TOOLBAR tb1 ButtonSize 65,40 Flat
         BUTTON TB_B1 Caption "Test"
      END TOOLBAR
      Grid Grid1 ;
      WIDTH 200 ;
      HEIGHT FrmMain.Height * .70 ;
      HEADERS {"NAME","SIZE","DATE","TIME","ATTRIBUTES"} ;
      WIDTHS {150, 80, 80, 60,85} ;
      COLUMNCONTROLS {{'TEXTBOX','CHARACTER'},{'TEXTBOX','NUMERIC'},{'TEXTBOX','DATE'},{'TEXTBOX','CHARACTER'},{'TEXTBOX','CHARACTER'}};
           JUSTIFY { GRID_JTFY_LEFT,GRID_JTFY_RIGHT,GRID_JTFY_RIGHT ,GRID_JTFY_RIGHT,GRID_JTFY_LEFT} ;
                 ITEMS aDir ;
                 VALUE 1 ;
                 on DBLCLICK MsgBox("Test DblClick")
   END SPLITBOX
   END WINDOW
   FrmMain.Activate
RETURN NIL
Warm regards,

Jayadev
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Split Box Grid Control on DblClick error

Post by danielmaximiliano »

Hi guys:
I must be a bug when using the control ON DblClick SplitBox
in HMG Refrences says:
- Controls / Windows defined as part of this container can be arranged
by users, using a gripperbar located at control's left side. It can be
used with listbox, grid, editbox, tree, browse, combobox, toolbar and
'SplitChild' windows. You must omit '@ <row>,<col>' in control definition.

- Since SplitBox is a container, you can specify when refer to
properties or events of its child controls, ie:

Win1.SplitBox.Grid1.Value := 10
The following code works

Code: Select all

#include <hmg.ch>

Function Main

 //** TestGridinSplitBox **//
   local aDir := Directory("*.*", "D")
   SET DATE BRIT
   DEFINE WINDOW FrmMain At 0,0 Width 640 Height 480 Main
   DEFINE SPLITBOX
      DEFINE TOOLBAR tb1 ButtonSize 65,40 Flat
         BUTTON TB_B1 Caption "Test"
      END TOOLBAR
      @ 5,5 Grid Grid1 ;
      WIDTH FrmMain.Width - 20;
      HEIGHT FrmMain.Height - 20;
      HEADERS {"NAME","SIZE","DATE","TIME","ATTRIBUTES"} ;
      WIDTHS {150, 80, 80, 60,85} ;
      COLUMNCONTROLS {{'TEXTBOX','CHARACTER'},{'TEXTBOX','NUMERIC'},{'TEXTBOX','DATE'},{'TEXTBOX','CHARACTER'},{'TEXTBOX','CHARACTER'}};
           JUSTIFY { GRID_JTFY_LEFT,GRID_JTFY_RIGHT,GRID_JTFY_RIGHT ,GRID_JTFY_RIGHT,GRID_JTFY_LEFT} ;
                 ITEMS aDir ;
                 Value 1;
                 on DBLCLICK {MsgBox("Test DblClick  OK", "Message" ) , DblCLickTest()  }
   END SPLITBOX
   END WINDOW
   FrmMain.Center
   FrmMain.Activate
RETURN NIL

Procedure DblCLickTest()

	MsgInfo ( Str ( This.CellRowIndex  )	, 'CellRowIndex' )
	MsgInfo ( Str ( This.CellColIndex  )	, 'CellColIndex' )	
	MsgInfo ( Str ( This.CellRow  )		, 'CellRow' )
	MsgInfo ( Str ( This.CellCol  )		, 'CellCol' )	
	MsgInfo ( Str ( This.CellWidth )	, 'CellWidth' )	
	MsgInfo ( Str ( This.CellHeight )	, 'CellHeight' )	

Return
On DblClick probe in example : C:\hmg.3.0.40\SAMPLES\CONTAINERS\SPLITBOX.1
and does not work, gives the same error.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
jayadevu
Posts: 240
Joined: Tue May 19, 2009 7:10 am

Re: Split Box Grid Control on DblClick error

Post by jayadevu »

Dear DanielMaximiliano,

Many thanks for your reply. I hope the bug will be corrected in the next release.

Warm regards,

Jayadev
Post Reply