forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


About TABLE element using API

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Apr 02, 2006 4:19 pm    Post subject: About TABLE element using API Reply with quote

Thanks to the aid of CodeScript I have been able to make the following code to control some features of TABLE VDS elements using API.
This allows to use all the possible combinations of behaviors of a table:

Code:

#-----------------------------------------------------------------------------#
#                                                                             #
# Author: uVeDeSe                                                             #
#                                                                             #
# Documentación:                                                              #
#                                                                             #
# Línea para cambiar propiedades del elemento TABLE:                          #
# %Z = @SENDMSG(@WINEXISTS(~TABLE1),@SUM($1000,54),0,$X)                      #
#                                                                             #
# Donde X puede ser:                                                          #
#                                                                             #
# xxxx xxx1      grid ($01)                                                   #
# xxxx xx1x      icon all columns ($02)                                       #
# xxxx x1xx      check ($04)                                                  #
# xxxx 1xxx      plain hot tracking ($0Cool                                     #
# xxx1 xxxx      headerdragdrop style ($10)                                   #
# xx1x xxxx      full row select ($20)                                        #
# x1xx xxxx      hand cursor ($40)                                            #
# 1xxx xxxx      hower select ($80)                                           #
#                                                                             #
# ESPECIALES                                                                  #
#                                                                             #
# x1xx + xxxx + xxxx + xxxx  labeltip ($4000)                                 #
#                                                                             #
# xxxx + 1xxx + x1xx +xxxx underline m_over asociado a hand cursor            #
# xxxx + 1xxx + x11x +xxxx underline m_over all columns asociado a            #
#                          hand cursor y full row select                      #
#                                                                             #
# xxx1 + 1xxx + x1xx + xxxx underline asociado a hand cursor                  #
# xxx1 + 1xxx + x11x + xxxx underline all columns asociado a                  #
#                          hand cursor y full row select                      #
#                                                                             #
#-----------------------------------------------------------------------------#
 
  title "Some features of TABLE VDS elements using API"
  option scale,96
 
  #define function,tblcommand
  %%cadena = "%x = @sendmsg(@winexists(~table1),@sum($1000,54),0,"
  %a = "15      14       13     12"
  %a = %a"           11       10       9        8"
  %a = %a"            7         6        5        4"
  %a = %a"            3         2        1        0"
  DIALOG CREATE,"Some features of TABLE VDS elements using API",-1,0,550,420
REM *** Modified by Dialog Designer on 02/04/2006 - 13:34 ***
  DIALOG ADD,STYLE,negrita,Verdana,8,B,,
  DIALOG ADD,STYLE,normal,MS Sans Serif,8,,,
  DIALOG ADD,GROUP,bits16,12,5,539,70,"Argumentos binarios (16 bits)"
  DIALOG ADD,SPIN,SPIN15,36,10,31,22,0|1,,Indiferente,CLICK
  DIALOG ADD,SPIN,SPIN14,36,41,31,22,0|1,,LabelTip,CLICK
  DIALOG ADD,SPIN,SPIN13,36,72,31,22,0|1,,Indiferente,CLICK
  DIALOG ADD,SPIN,SPIN12,36,103,31,22,0|1,,"Underline (12+11+6)@cr()Underline all columns (12+11+6+5)",CLICK
 
  DIALOG ADD,SPIN,SPIN11,36,145,31,22,0|1,,"Underline MouseOver (11+6)@cr()Underline MouseOver all coulmns (11+6+5)",CLICK
  DIALOG ADD,SPIN,SPIN10,36,176,31,22,0|1,,Indiferente,CLICK
  DIALOG ADD,SPIN,SPIN9,36,207,31,22,0|1,,Indiferente,CLICK
  DIALOG ADD,SPIN,SPIN8,36,238,31,22,0|1,,Indiferente,CLICK
 
  DIALOG ADD,SPIN,SPIN7,36,280,31,22,0|1,,Hower select,CLICK
  DIALOG ADD,SPIN,SPIN6,36,311,31,22,0|1,,Hand cursor,CLICK
  DIALOG ADD,SPIN,SPIN5,36,342,31,22,0|1,,Full row select,CLICK
  DIALOG ADD,SPIN,SPIN4,36,373,31,22,0|1,,Headerdragdrop style,CLICK
 
  DIALOG ADD,SPIN,SPIN3,36,415,31,22,0|1,,Plain hot tracking,CLICK
  DIALOG ADD,SPIN,SPIN2,36,446,31,22,0|1,,Add check,CLICK
  DIALOG ADD,SPIN,SPIN1,36,477,31,22,0|1,,Icon all columns,CLICK
  DIALOG ADD,SPIN,SPIN0,36,508,31,22,0|1,,Grid,CLICK
 
  DIALOG ADD,TEXT,txt_bit,63,19,,,%a,,normal
  DIALOG ADD,TEXT,lncommand,110,7,,,Línea de comando:,,normal
  DIALOG ADD,EDIT,comando,122,5,536,19,,,READONLY,negrita
  DIALOG ADD,GROUP,ejemplo,171,3,538,246,Ejemplo de Tabla
  DIALOG ADD,TABLE,TABLE1,188,11,525,224,Column 1[80]|Column 2[80]|Column 3[80]
  DIALOG SHOW

  %a = 0
  repeat
    list add,table1,"Hola, este es un elemento de la columna primera"@tab()elemento columna 2@tab()fila: %a|#c:\windows\system32\shell32.dll|%a
    %a = @succ(%a)
  until @equal(%a,10)
 
  goto SPINCLICK
 
:bucle
  wait event
  %e = @event()
  if @equal(@substr(%e,1,4),SPIN)
    goto SPINCLICK
  end
  goto %e

:CLOSE
  exit
 
:SPINCLICK
  %a = @tblcommand()
  dialog set,comando,%%cadena%a
  %Z = @SENDMSG(@WINEXISTS(~TABLE1),@SUM($1000,54),0,%a)
  goto Bucle
 
:tblcommand
  rem Lee los SPIN y devuelve los valores en HEX
 
  %9 =
  %8 = 3
  repeat
    %7 = @prod(@dlgtext(SPIN@sum(@prod(%8,4),3)),Cool
   %6 = @prod(@dlgtext(SPIN@sum(@prod(%8,4),2)),4)
   %5 = @prod(@dlgtext(SPIN@sum(@prod(%8,4),1)),2)
   %4 = @dlgtext(SPIN@prod(%8,4))
 
    %3 = @sum(@sum(@sum(%7,%6),%5),%4)
    if @greater(%3,10)
      %3 = @diff(%3,10)
      %3 = @chr(@sum(%3,65))
   end
   %9 = %9%3
   
   %8 = @pred(%Cool
  until @equal(%8,-1)
exit $%9


I have several doubts: somebody knows how to change the height of row of a table? How to write in a cell a text with two rows to the style line1@cr()line2? how to insert an image in any cell? Thank Very Happy



Some features of TABLE VDS elements using API.dsc
 Description:

Download
 Filename:  Some features of TABLE VDS elements using API.dsc
 Filesize:  5.64 KB
 Downloaded:  1602 Time(s)

Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Mon Apr 03, 2006 8:59 am    Post subject: Reply with quote

good job Smile

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sat Apr 08, 2006 10:59 pm    Post subject: Reply with quote

The correct code can download from:
http://vds.uvedese.es/index.php?option=com_content&task=view&id=46&Itemid=27
Rolling Eyes I'm sorry
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group