1. ATK Gimmy Susan
  2. PowerBuilder
  3. Wednesday, 18 March 2020 20:42 PM UTC

Hi to everyone

I'm trying to use 'Tile Menu Style using Datawindow Object' on a server client project
 
https://community.appeon.com/index.php/articles-blogs/tips-tricks-techniques-articles/17-powerbuilder/263-tile-menu-style-using-datawindow-object )
 
When I click with the mouse on a tile, how do I know wich row I'm clicking?
I need to read column values. 
 
Thank you early for the answer
Accepted Answer
ATK Gimmy Susan Accepted Answer Pending Moderation
  1. Sunday, 22 March 2020 09:36 AM UTC
  2. PowerBuilder
  3. # Permalink
string ls_1, ls_2
long li_tab
integer li_1, li_2, li_resto, li_riga
string ls_filtro
string  ls_prodinfo
ls_prodinfo = getobjectatpointer()
li_tab = Pos(ls_prodinfo, "~t", 1)
ls_1 = Left(ls_prodinfo, li_tab - 1)
ls_2 = Mid(ls_prodinfo, li_tab + 1)

li_resto = ( mod ( dec(ls_2) , ii_colonne) )
if li_resto <> 0 Then
 li_resto  = ii_colonne - ( mod ( dec(ls_2) , ii_colonne) )
end if
li_2 = dec(ls_2) + li_resto

li_riga = ( li_2 / ii_colonne ) - 1
li_riga = ( li_riga * ii_colonne )+ dec(mid(ls_1, 3, 99))

is_titolo = getitemstring(li_riga, 'tilename')
ls_filtro = "titolo = '"+(is_titolo)+"'"
 
 
 
 
 
NB: where ii_colonne is the number of columns for row
Comment
  1. Armeen Mazda @Appeon
  2. Sunday, 22 March 2020 15:50 PM UTC
Thanks for sharing the solution!
  1. Helpful
  1. ATK Gimmy Susan
  2. Sunday, 22 March 2020 16:07 PM UTC
;)
  1. Helpful
There are no comments made yet.
ATK Gimmy Susan Accepted Answer Pending Moderation
  1. Wednesday, 18 March 2020 21:08 PM UTC
  2. PowerBuilder
  3. # 1

i click on 'Coge', the 3rd column.

It returns 7.

 

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 19 March 2020 16:01 PM UTC
Hi Gimmy;

Depending on your DW Type and display settings* - that could be correct.

* - Tabular DW type with N-Up preview (columns across)

- Nu-Up DW type with # columns across

- etc

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 March 2020 21:01 PM UTC
  2. PowerBuilder
  3. # 2

Hi Gimmy;

  Have you tried using the GetObjectAtPointer() command?

It returns you the object name + row number

HTH

Regards ... Chris

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.