Home » U++ Library support » RichText,QTF,RTF... » RichTextView::GetData() Method
RichTextView::GetData() Method [message #57511] |
Tue, 14 September 2021 20:46 |
mubeta
Messages: 77 Registered: October 2006
|
Member |
|
|
If the qtf code in the viewer don't contain any text, the GetData method return an empty string, losing all the others qtf data: paragraph format and what else. I think that is not the best, and for my developing app, I had remove this feature.
Value RichTextView::GetData() const
{
//if(text.IsEmpty()) return Value();
return GetQTF();
}
|
|
|
|
Re: RichTextView::GetData() Method [message #57533 is a reply to message #57513] |
Fri, 17 September 2021 15:14 |
mubeta
Messages: 77 Registered: October 2006
|
Member |
|
|
Hi Mirek,
SetData() and GetData() methods are the best, due of the fact that they are present in each controls and so the interface from GUI to the app source code is very simple.
All my app is based on a lot of graphical forms of data stored in a databases, and for show and store the data I am using a code similar to this one:
Ctrl *ctrl = GetFirstChild();
while(ctrl)
{
if(fields.Find(ToUpper(ctrl->GetLayoutId())) >= 0 )
update.Column(SqlId(ToUpper(ctrl->GetLayoutId())), ctrl->GetData());
ctrl = ctrl->GetNext();
}
ctrl = GetFirstChild();
while(ctrl)
{
if (!sql1[SqlId(ctrl->GetLayoutId())].IsNull())
ctrl->SetData(sql1[SqlId(ctrl->GetLayoutId())]);
ctrl = ctrl->GetNext();
}
As you can see, using SetData() and GetData() the amount of source code is very small, and GUI controls only need to be named the same as the field in the DB. What you are asking will require a very big amount of different source code, more trubles, etc.
|
|
|
Goto Forum:
Current Time: Fri Apr 19 10:53:22 CEST 2024
Total time taken to generate the page: 0.01273 seconds
|