Solved

wordwrap in flexgrid

Posted on 2002-06-26
5
1,491 Views
Last Modified: 2012-05-04
Hi All!

I'm having a problem with the wordwrap property in flexgrid.  I have a flexgrid containing 2 columns and X number of rows, depending on how many questions I am feeding in from a text file.  Column 1 is a fixed column and displays the a question per row.  I have embedded a textbox in column 2.  

I have already set...
AllowUserResizing = 2-flexResizeRows
WordWrap = True

I am able to resize my rows during runtime, but I don't want to do this.  I want to have the rows already resized based on the length of characters per row when the grid appears in runtime.

Thanks all!
shellei
0
Comment
Question by:shellei
5 Comments
 
LVL 6

Accepted Solution

by:
pierrecampe earned 200 total points
ID: 7112222
>>I want to have the rows already resized based on the >>length of characters per row when the grid appears in >>runtime.
i dont understand what you want
if you resize the rows according to the text in column 2 and the wordwrap is true then column 2 will be as wide as the widest word in the text
is that what you want,if so i can tell you how
if you want the width of column 2 to be pre-assigned and you want the rows width to grow so all the text shows i can tell you to how to do it
if you want the row to grow while the user types text in the textbox,again i can tell you how
so please explain more clearly what you want
what i usualy do is assign a fixed width to the colums and let the rows grow according to te text the user types in it

0
 

Author Comment

by:shellei
ID: 7122897
I am sorry, I meant to say that I can resize the row height during run-time on column 1 (fixed column).  Therefore, the edit box in column 2 will automatically get resized.  But I don't want to resize column 1 during run-time, I would like to have it already resized based on the length of the sentence before the screen gets displayed.  I hope that has cleared things up.

Thanks!
shellei
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 7125452
>>I hope that has cleared things up.
nope i still dont understand what you are trying to do
however here is the 'general' system to make rows/columns resize automaticly according to the text in a cell:
on your form place a label control
label.autosize=true
label.wordwrap=true
this label may be visible=false
now before placing text in a cell put it in this label, and the label will autosize to its contents
that is its widht will be the width of the longest word in the text, if now you increase its width to the width of a column it will adjust its height to accommodate the text,
and now just set the grids rowheight of that row to the label.height
since i still dont understand fully what you want to do, you may have to tweak it a bit to serve your needs
however if you give me your e-mail i'll send you a program showing how you can make an editable flexgrid that automaticly resizes its rows to accomodate what is typed into it while the user is typing into it


0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7964522
Hi shellei,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept pierrecampe's comment(s) as an answer.

shellei, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8014765
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ms access #TYPE! error on report when no data 4 68
change vba from autofit to 13.5 width? 4 28
VBA saving file message display 5 57
How to Add / Edit Windows Menu 4 52
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now