on the other hand, can i simulate a click on wanchor object programatically?


________________________________
 From: Nagaev Boris <[email protected]>
To: Oto Magaldadze <[email protected]> 
Sent: Sunday, April 29, 2012 2:11 AM
Subject: Re: [Wt-interest] html table, file open/save dialog
 
Hello!

If you want to create a button "Download", try to create an WAnchor,
pointed to WFileResource, with no text, and WPushButton as a child of
that WAnchor. (WAnchor is a descendant of WContainerWidget, so you can
add other widgets into it.) I have not tried it, but this should work.

On Sun, Apr 29, 2012 at 01:34, Oto Magaldadze <[email protected]> wrote:
> ok so i need WTable and WTableCell classes, thanks.
>
> and on the second part of the question can I use WPushButton instead of
> WAnchor. or connect WAnchor click event to pushbuttons's click?
>
> ________________________________
> From: Nagaev Boris <[email protected]>
> To: Oto Magaldadze <[email protected]>
> Cc: "[email protected]"
> <[email protected]>
> Sent: Sunday, April 29, 2012 1:22 AM
>
> Subject: Re: [Wt-interest] html table, file open/save dialog
>
> Hi!
>
> Cells can be merged, use WTableCell::setColumnSpan and
> WTableCell::setRowSpan for this. A cell can be obtained by using
> WTable::elementAt.
>
> On Sun, Apr 29, 2012 at 01:05, Oto Magaldadze <[email protected]> wrote:
>> thanks dude, and does WTable has ability to merge/split cells?
>>
>> ________________________________
>> From: Nagaev Boris <[email protected]>
>> To: Oto Magaldadze <[email protected]>;
>> [email protected]
>> Sent: Saturday, April 28, 2012 9:02 PM
>> Subject: Re: [Wt-interest] html table, file open/save dialog
>>
>> Hello!
>>
>>> 1. what wt class is suitable to construct an html table (the one in Qt
>>> would
>>> be QTextTable, couldn't find something like this in Wt) ?
>> See WTable or WTableView
>> http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WTable.html
>> http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WTableView.html
>> Use WTableView as part of Wt Model/View system:
>> http://www.webtoolkit.eu/wt/doc/reference/html/group__modelview.html
>>
>> A good example of using WTableView:
>> http://www.webtoolkit.eu/widgets/charts/scatter-plots
>> (table)
>>
>>> 2. is there a file opening/saving dialog class in wt (in Qt it's
>>> QFileDialog) ?
>>
>> Class WFileUpload can be used to select a file from user's machine and
>> to load it to a server:
>> http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WFileUpload.html
>>
>> To save a file to user's hard drive, use WAnchor in conjunction with
>> WFileResource:
>>
>> http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WFileResource.html
>>
>> Wt::WFileResource *csvFile = new Wt::WFileResource("text/csv",
>> "/opt/files/afile.csv");
>> csvFile->suggestFileName("data.csv");
>> Wt::WAnchor *anchor = new Wt::WAnchor(csvFile, "CSV data");
>>
>> Wt::WFileResource *imageFile = new Wt::WFileResource("image/png",
>> "/opt/files/image.png");
>> imageFile->suggestFileName("data.png");
>> Wt::WImage *image = new Wt::WImage(imageFile, "PNG version");
>>
>>
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to