Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - SOLVED: Force string to full view
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Force string to full view

 Post Reply Post Reply
Author
Message
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Force string to full view
    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....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.