Home » U++ Library support » RichText,QTF,RTF... » RichTextView::GetData() Method
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: Thu Jun 12 10:10:26 CEST 2025
Total time taken to generate the page: 0.04122 seconds
|