Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: richText box scrolls to end automatically
Topic Summary:
Created On: 17-Aug-2004 15:02
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 17-Aug-2004 15:02
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

Hello All,
We have come to a problem where a box that is opened with a DBE of type richText inside, which is limited to 5 lines, if the text inside the DBE is longer than 5 lines, the DBE is automatically scrolled to the end of the text, instead of the beginning. We have tried to use the home function, but it didn't make any difference.

Thanks in advance,
Asaf.



Edited: 17-Aug-2004 at 15:22 by Asaf Kivity
Report this to a Moderator Report this to a Moderator
 17-Aug-2004 19:02
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Odd. My text DBEs scroll to the top. I use the "realize(db)" then "show(db)" sequence. There is also a "setFocus(dbe)" that may do what you want. Also perhaps try a "set(dbe, true)", "set(dbe, false)" (set read-only, then read-write) after you set its contents.

- Louie
Report this to a Moderator Report this to a Moderator
 18-Aug-2004 11:58
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

There might be another reason. it happens only when i try to display a DXL attribute in that field. for other information (text attributes), this problem does not exist.
Any ideas?
Report this to a Moderator Report this to a Moderator
 18-Aug-2004 14:54
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Do what? Better let us peak at the DXL
Report this to a Moderator Report this to a Moderator
 18-Aug-2004 17:24
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

The DXL attribute displayes some information in richText format, the DBE element is richText also.
I will attach it tomorrow.
Thanks !
Asaf

Edited: 19-Aug-2004 at 12:09 by Asaf Kivity
Report this to a Moderator Report this to a Moderator
 19-Aug-2004 12:15
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

There is the code. the problem is that there are many includes, and many attributes to be here.

>>>>
/*
Create a form for Reviewers
*/


// Copy values from one attribute to another

/*
*/
// A script for MRD SRD Module owners. it will allow them to move suggestions to Modules.

/*
A script for MRD SRD Module owners. it will allow them to move suggestions to Modules.
*/

const string sendFrom = "MRD"

#include <Nice/include/defs.inc>



string predText
DB db = null
DBE fromDbe1 = null
DBE toDbe1 = null
DBE fromDbe2 = null
DBE toDbe2 = null
DBE fromDbe3 = null
DBE toDbe3 = null
DBE CreateRep = null
DBE ClearFields = null
DBE CreateCol = null
DBE targetMods = null
DBE DoNext = null
DBE DoPrev = null
DBE ReviewersComments = null
DBE Reviewrs = null
DBE ID = null


#include <nice/include/form_utils.inc>



Module currMod = current
string modName = name currMod
Object o = current



objectID = getinfoFromAttr(o,IDAttrName)
revComments = getinfoFromAttr(o,revCommentsAttrName)
reviewers = getinfoFromAttr(o,reviewersAttrName)

User currUser = find (doorsname)


Group group
AttrDef ad
for group in groupList do {
if (member(group,currUser)){
buildAttrGroupNameDecision = group.name
buildAttrGroupNameResponse = group.name
buildAttrGroupNameDecision = buildAttrGroupNameDecision " Response"
buildAttrGroupNameResponse = buildAttrGroupNameResponse " Comments"

if (exists attribute buildAttrGroupNameDecision){
stringForDecision = buildAttrGroupNameDecision
}
if (exists attribute buildAttrGroupNameResponse ){
stringForResponse = buildAttrGroupNameResponse
predText = o.stringForResponse

}

}
}




if (null stringForDecision || null stringForResponse){
ack "You do Not have the right to review suggestions"
if (isLockedByUser(current Object))
unlockDiscardSection (current Object)
halt
}



db = create(current Module, "NICE - Edit Response/Decision",styleCentred ) // used to return focus to current Module
ID = field (db,"ID", objectID,5,true)

Reviewrs = richText (db, reviewersAttrName,reviewers,300,80,true)
ReviewersComments = richText (db, revCommentsAttrName,revComments,300,80,true) // )Problematic Field
fromDbe1 = choice (db, stringForDecision ":", dummyList, 0)
fromDbe2 = richText (db,stringForResponse":",predText,300,80,false)


DoPrev = apply (db, upArrow ,doPrev)
DoNext = apply (db, downArrow ,doNext)

CreateRep = apply (db, "Apply", doApply)
CloseBtn = apply(db, "Cancel", doCancel)

close(db, false, doCancel )
setFocus (CreateRep)
Reviewrs -> "top" -> "spaced" -> ID
fromDbe1->"right"->"unattached"
fromDbe2->"top"->"spaced"->fromDbe1
CreateRep->"top"->"spaced"->fromDbe2

AttrDef thisAttrDef
string thisAttrName
AttrType thisAttrType
int val = -1
string attrVal
int i
for thisAttrType in current Module do {
if( thisAttrType.name == responses){
int numVals = thisAttrType.size
string vals[numVals]
if ( numVals == 0 ) continue

for i in 0:numVals-1 do
{
vals = thisAttrType.strings
put (decisionVals,thisAttrType.strings,1,i+1)
attrVal = o.stringForDecision
if (vals == attrVal)
val = i
}
set (fromDbe1,vals)
}
}

set (fromDbe1,val)
if (isLockedByUser(current Object))
unlockDiscardSection (current Object)
home ReviewersComments // doesn't do anything
block (db)
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.