Print Page | Close Window

SOLVED: Force string to full view

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=11558
Printed Date: 06 May 2024 at 6:13am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Force string to full view
Posted By: Aaron
Subject: SOLVED: Force string to full view
Date Posted: 24 July 2008 at 2:50am
Hi,
 
I want to see the full string in a PropertyItemString or PropertyItemMultilineString, is this possible?
 
Example string = C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX V12.0\Samples\ReportControl\VB\ReportSample\Icons
 
Thanks
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Replies:
Posted By: Oleg
Date Posted: 24 July 2008 at 4:59am
Hi,
User can see full string if hover over its value in tooltip....


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 24 July 2008 at 5:29am
Hi Oleg
 
If I wanted to know that, my question would be: Is it possible to see the full string when hovering the item?
 
Please, look at the question again. If you don't see question properly, use MS Magnifier again
 
Thanks again


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Oleg
Date Posted: 24 July 2008 at 7:43am
Seriosuly can't catch it.
To show full string in PropertyItemString you need resize your propertry grid to fit string's wdith. What else?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 24 July 2008 at 7:52am
 
Yes or No
 
 
And please don't be so difficult, you know exactly what I mean.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 24 July 2008 at 4:12pm
Hey Aaron,

If you set the VariableItemsHeight property of the PropertyGrid to True, you can set the Item.Height to some multiple of the TextHeight (say 3 lines). The for the item you want to show the full text for, set the ValueMetrics.DrawTextFormat = DrawTextWordBreak. (I've tested this for PropertyItemString only).

It should be possible to do the math for the required height for a particular width, but I haven't looked into if events exist that would allow us to dynamically set the height to always fit the full text when the PropertyGrid or Splitter is resized...I'll look into it.

And in Oleg's defence, I didn't understand exactly what you were looking for at first either :) Hope I interpreted it correctly.



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 24 July 2008 at 5:09pm
Hi Aaron,

Here's a sample that *almost* works. I've noticed something that appears to be a bug however. The PropertyGridItem ignores the DrawTextWordBreak format when the item has focus. 

Also, I can't get the line count to match the word break exactly in all cases...my fudge number 5 can show 2 lines when only 1 is required when the text is near the edge of the first line (without wrapping). However changing it to 4 is worse (the wrapping can occur, but there is not enough space to show all of the item text).

Lastly, it appears that the wrapping doesn't properly occur in the control when you get over 2 lines with a long string with no spaces (like you path...maybe a bug in the control).

You can try the attached example and see if you have more success.

uploads/20080724_170827_PropGridItemRes.zip - uploads/20080724_170827_PropGridItemRes.zip


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 25 July 2008 at 6:30am
Hi Jason,
 
Thanks for reply, if you put in a string as I showed in the first post it won't work, so this isn't helping me. I expect, when setting VariableHeight to True, the griditem would be resized to it's contents and NOT have to do a lot of calculating. But it doesn't work at all, even with DrawTextWordBreak, so why bother  
 
Thanks again


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 25 July 2008 at 11:33am
Hi Aaron,

I did try your string, and it *almost* works. I think the code is useful for illustrating a problem with the CJ word wrapping - it only splits at space characters. This may just be the behaviour of the DrawText/DrawTextEx API though (if that is what CJ uses to draw the text to the screen), so I wonder if there is much they can do about it though.

The code is also useful for illustrating another problem - when a row is selected DrawTextWordBreak is ignored.

Personally, I think that VariableItemsHeight=True should mean just that - that each row can have its own height, but not be automatically calculated. If a user types 10 lines of text, I might only want to show 3 (for  example). But it would be very useful if the PropertyGridItem had an AutoHeight property (or similar). When True the row would be sized to fit the text. Of course this would require proper word-breaking at not just spaces, but also slashes, dashes, (others?).




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 26 July 2008 at 3:40am
Hi Jason,
 
Would be nice if this would work. For the autoresizing of multiline items issue, we have a property already: MultiLinesCount , so if set to 3 resize only for 3 lines  I think CJ is preparing Markup for propitems as well  so than we don't need it anymore, we will make our own DrawTextWordBreak hehehe.
 
Thanks
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net