Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Cant enter multiple lines Multiline control???????
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cant enter multiple lines Multiline control???????

 Post Reply Post Reply
Author
Message
BoboP View Drop Down
Groupie
Groupie


Joined: 21 March 2008
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote BoboP Quote  Post ReplyReply Direct Link To This Post Topic: Cant enter multiple lines Multiline control???????
    Posted: 13 June 2008 at 7:00am
Hi !

I have used property grid in my application , where I needed multi-line
text box for value part.

I have it , but then i cant enter multiple lines into it.
it just lets enter only one line.

PropertyGridItem itemP;
                       
itemP = materialDetailItem.AddChildItem(PropertyItemType.PropertyItemMultilineString,"hi","")

itemP.EditStyle = PropertyItemEditStyle.EditStyleMultiLine;

                        itemP.MultiLinesCount = 3;
                        itemP.Height = 100;
                      

whats wrong here ?

Thanks


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: 13 June 2008 at 12:06pm
Hi,
 
By default user have to press Ctrl+Enter for new line.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BoboP View Drop Down
Groupie
Groupie


Joined: 21 March 2008
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote BoboP Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2008 at 12:49am
Hi ! Oleg !

Thanks for replying . I tried pressing Ctrl + Enter . But No use ,

What else can be the reason ? , I have ok button on the same form set as Accept button . So whenever I press enter ok button is pressed , Can this interfere in property grid Ctrl+Enter.

I have been trying this . I read earlier post regarding multi line control . But I can only enter only one value.




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: 14 June 2008 at 5:22am
Hi,
 
Do you have VariableItemsHeight  = True ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 14 June 2008 at 9:38am
Hi BoboP,

The PropertyItemMultilineString type seems to be for creating a drop-down multiline edit window that accepts an unlimited amount of text...The PropertyGrid cell portion will only accept a single line. if you want to limit the lines and accept Enter in the PG cell portion, try the following code:

(NOTE: You will have to adapt this slightly for the language you are using, I just realized you aren't using VB6...It should be fairly straight forward.)


Private Sub Form_Load()
   Dim itemP As PropertyGridItem
   Dim objCat As PropertyGridItem
                      
   With Me.PropertyGrid1
      .VariableItemsHeight = True
      Set objCat = .AddCategory("Test")
   End With
  
   Set itemP = objCat.AddChildItem(PropertyItemString, "hi", "")  ' Don't use PropertyItemMultilineString
                                                                  ' it seems to just give you a multiline dropdown
                                                                  ' The dropdown allows for unlimited lines no matter what
                                                                  ' and the grid cell seems to only allow for a single line
   With itemP
      .EditStyle = &H1000  ' &H1000 = Want return style (so user doesn't have to pres Ctrl+Enter)
                           ' Don't use EditStyleVScroll unless you want the user
                           ' to be able to enter unlimited lines of text
      .MultiLinesCount = 3 ' Allow the regular string cell to be three lines high.
   End With
End Sub



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

Language: Visual Basic 6.0 SP6

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.152 seconds.