cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create thumbnail(or image or preview) in table cell

CHASEONHO
18-Opal

How to create thumbnail(or image or preview) in table cell

Hi,

 

Create the Table UI using the C++ Toolkit.
The rows in the table display the components of the active assembly in a level structure.
Each row displays the name and information of the component.

 

Now we need to display the visual element of the component corresponding to the selected row.
How can I display a visual element (Thumbnail or Image) of a selected component?

 

If you have any good ideas, please share them.

1 ACCEPTED SOLUTION

Accepted Solutions
RPN
14-Alexandrite
14-Alexandrite
(To:CHASEONHO)

The sample is completely written in Tcl/Tk, using Toolkit in the Background, and in Tk you can use a couple of widgets, e.g. Label, Button, Tree, TreeCntl, Ckeckbutton .. to display an image from file.

 

In Tcl I can use

 

ps_utile image_write -width100 -height 100 -type jpeg -dpi 400 -model box.prt — c:/temp/box.prt.jpg

As far I see the ProRasterFileWrite function has very similar options, only the model option is replaced, because the window ID is searched by the given model.

 

It is by far easier and much faster in Tk to create an Interface. 

Good Luck 😀

 

View solution in original post

3 REPLIES 3
RPN
14-Alexandrite
14-Alexandrite
(To:CHASEONHO)

Something like this , here the image will use the model stamp info, to make sure the image is the one which needs to be displayed, start at 11:51. The whole interface developed in 4 hours, I guess you may need for such an interface multiples of this 😀.

 

The PTC tree can display labels, and a label is capable to show a bitmap, this is probably what you need.

Hi,

That's a good video.


When displaying the image in the video above, are you using ProRasterFileWrite to save the image and then display it?

 

Thanks.


Warm Regards,

SeonHo Cha.

RPN
14-Alexandrite
14-Alexandrite
(To:CHASEONHO)

The sample is completely written in Tcl/Tk, using Toolkit in the Background, and in Tk you can use a couple of widgets, e.g. Label, Button, Tree, TreeCntl, Ckeckbutton .. to display an image from file.

 

In Tcl I can use

 

ps_utile image_write -width100 -height 100 -type jpeg -dpi 400 -model box.prt — c:/temp/box.prt.jpg

As far I see the ProRasterFileWrite function has very similar options, only the model option is replaced, because the window ID is searched by the given model.

 

It is by far easier and much faster in Tk to create an Interface. 

Good Luck 😀

 

View solution in original post

Announcements