Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The incredible shrinking column
Message
 
 
À
03/12/2001 13:36:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00588828
Message ID:
00589120
Vues:
25
Hi!

Well, I do not know the real reason, though following command from your code lines is very suspicious:

.SETALL("BOUND", .F., "COLUMN")

As far as I know, keeping it .T. is ok for most cases of readonly grids.
Also, try to put replicate('X',50) as InputMask for text box.

HTH.

>Hi All,
>
>I am having strange behavior in the textboxes in my grid columns. Because the grid is used for several different cursors, I have to redefine it for each one. I needed code in the DBLCLICK event, so I had to do a DEFINE to create the textbox. What is happening is when the grid appears everything looks great. But, as soon as I click on any of the columns (textboxes). The visible display of the data is cut short (Truncated?). What showed as 50+ characters now shows 12. I can’t seen to find why. Any ideas.
>
>DEFINE CLASS dblclktext AS TEXTBOX
>
> VISIBLE = .T.
> SPECIALEFFECT = 1
> BORDERSTYLE = 0
> BACKCOLOR = RGB(255,255,254)
> * This is the required procedure.
> PROCEDURE DBLCLICK
> DO CASE
> CASE req_detl
> THISFORM.contDetail.cmdMoreInfo.CLICK
> CASE win_shop
> THISFORM.contDetail.cmdQuit.CLICK
> ENDCASE
>ENDDEFINE
>
>WITH .grid1
> .RECORDSOURCE = ""
> .COLUMNCOUNT = -1
> .SCROLLBARS = 2
> .ALLOWROWSIZING = .F.
> .DELETEMARK = .F.
> .COLUMNCOUNT = 6
> .RECORDSOURCE = "curreq"
> .column1.WIDTH = 25
> .column2.WIDTH = 150
> .column3.WIDTH = 90
> .column4.WIDTH = 75
> .column5.WIDTH = 75
> .column6.WIDTH = 350
> .SETALL("BOUND", .F., "COLUMN")
> .SETALL("SPARSE", .F., "COLUMN")
> .COLUMN1.ADDOBJECT( 'txtbox', 'dblclktext' )
> .COLUMN2.ADDOBJECT( 'txtbox', 'dblclktext' )
> .COLUMN3.ADDOBJECT( 'txtbox', 'dblclktext' )
> .COLUMN4.ADDOBJECT( 'txtbox', 'dblclktext' )
> .COLUMN5.ADDOBJECT( 'txtbox', 'dblclktext' )
> .COLUMN6.ADDOBJECT( 'txtbox', 'dblclktext' )
> .SETALL("CURRENTCONTROL", 'txtbox', "COLUMN")
> .column1.txtbox.CONTROLSOURCE = "curreq.ord_ln_no"
> .column2.txtbox.CONTROLSOURCE = "curreq.user_part_no"
> .column3.txtbox.CONTROLSOURCE = "curreq.cost_amt"
> .column4.txtbox.CONTROLSOURCE = "curreq.qty_ord"
> .column5.txtbox.CONTROLSOURCE = "curreq.uom"
> .column6.txtbox.CONTROLSOURCE = "curreq.part_desc"
> .column1.header1.CAPTION = "No."
> .column2.header1.CAPTION = IIF( nLangue = 1, "No. PIÈCE", "PART Number" )
> .column3.header1.CAPTION = IIF( nLangue = 1, "COÛT STD", "STD COST" )
> .column4.header1.CAPTION = IIF( nLangue = 1, "QTÉ", "QTY" )
> .column5.header1.CAPTION = "UOM"
> .column6.header1.CAPTION = "DESCRIPTION"
> .SETALL( "MOVABLE", .F., "COLUMN" )
> .SETALL( "RESIZABLE", .F., "COLUMN" )
> .SETALL( "READONLY", .T., "COLUMN" )
> .SETALL( "ALIGNMENT", 0, "COLUMN" )
> .SETALL( "ALIGNMENT", 2, "HEADER" )
> .SETALL("FONTBOLD", .T., "HEADER")
> .SETALL("FORECOLOR", RGB(0,0,255), "HEADER")
> .SETALL("BACKCOLOR", RGB(192,192,192), "HEADER")
>ENDWITH
>
>VFP6 SP5
>
>TIA
>Mike
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform