| View previous topic :: View next topic |
| Author |
Message |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Mar 09, 2005 1:50 pm Post subject: VDSOBY.DLL help with grids |
|
|
Im putting two gird on TAB1
OBJECT ADD,GRID,GRID1,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID2,230,134,490,172,1,8,486,20
and
on TAB2
OBJECT ADD,GRID,GRID1,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID2,230,134,490,172,1,8,486,20
I cant change GDRID 1 or GRID 2 in something else i get error when i try to go on another tab ?
TAB windows are just OK...fully functional OK |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Mar 09, 2005 1:58 pm Post subject: |
|
|
OBJECT SETCELL,GRID1,ROW,1,@TAB()Test
and this don't work |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Mar 09, 2005 2:08 pm Post subject: |
|
|
How to do color on row
I trying to create a similar GRID style like in iTunes |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Wed Mar 09, 2005 4:20 pm Post subject: |
|
|
OBJECT ADD,GRID,GRID1,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID2,230,134,490,172,1,8,486,20
You can't use GRID1 and GRID2 again after they are already created, you need to put GRID3, GRID4 on TAB2.
OBJECT SETCELL,GRID1,ROW,1,@TAB()Test
I'm not sure about this one as I haven't tested using tab, what exactly is not working about it?
As to colors, you can't change the color of individual cells, you can only change the color of the entire grid by using a OBJECT STYLE. |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Mar 09, 2005 5:18 pm Post subject: |
|
|
So the GRID only work one way
If tab1 have grid1/grid2
if tab2 have grid3/grid4
this dont work or what...
OBJECT REMOVE,GRID1
OBJECT REMOVE,GRID2
About
OBJECT SETCELL,GRID1,ROW,1,@TAB()Test
i get funny line vertical like separator |
i like do to center on row
thanks for now |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Wed Mar 09, 2005 9:14 pm Post subject: |
|
|
OBJECT REMOVE should work fine, what error do you get when you try to recreate the control?
Check your code to make sure it is being removed correctly and that you are not using object remove multiple times.
I don't think @tab will work, that control is plain text and to my knowledge wont support the tab character so it shows a character box that looks like | (box shaped). Even the normal VDS EDIT dialog control does the same thing if you try to set a @tab() character in it.
You can't really set the style for the text to be centered in cells, unless you use spacebar characters. |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Mar 10, 2005 5:00 am Post subject: |
|
|
Cannot create dialog element
I really dont know this grid works only one way |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Mar 10, 2005 6:14 am Post subject: |
|
|
| Try compiling the script and trying, I know there are some problems when running it through the VDS IDE in script/run mode. |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Mar 10, 2005 6:26 am Post subject: |
|
|
Nope
RUNTIME ERROR 21
any idea
This part of code is defective it's useless
OBJECT REMOVE,GRID1
OBJECT REMOVE,GRID2 |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Mar 10, 2005 6:55 am Post subject: |
|
|
My tab system:
if @not(%1)
%1 = TAB1
gosub %1OPEN
end
:Tab1CLICK
:Tab2CLICK
:Tab3CLICK
%2 = @substr(%E,1,-5)
gosub %1CLOSE
shift
gosub %1OPEN
goto loop
:TAB1OPEN
OBJECT ADD,GRID,GRID1,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID2,230,134,490,172,1,8,485,20
exit
:TAB1CLOSE
OBJECT REMOVE,GRID1
OBJECT REMOVE,GRID2
exit
:TAB2OPEN
OBJECT ADD,GRID,GRID3,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID4,230,134,490,172,1,8,485,20
exit
:TAB2CLOSE
OBJECT REMOVE,GRID3
OBJECT REMOVE,GRID4
exit
and so on and so on... |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Mar 10, 2005 7:59 am Post subject: |
|
|
Dunno if this is a stupid question or not, but are you using the main window
as the parent for the grid or are you using the tab control as the parent? _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Mar 10, 2005 10:11 am Post subject: |
|
|
Main window with tabs and on this tabs are grids
I will post a full tabs sample soon... |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Mar 10, 2005 10:48 am Post subject: |
|
|
False ALARM guys
This code is just OK and OK i
external @path(%0)vdsobj.dll
Title TAB test with VDSobj.dll
DIALOG CREATE,TAB test with VDSobj.dll,-1,0,650,510
%%win = @winexists("TAB test with VDSobj.dll")
OBJECT CLASS,%%win
DIALOG ADD,TAB,TAB1,4,6,640,446,TAB one|TAB two
DIALOG SHOW
if @not(%1)
%1 = TAB one
gosub %1OPEN
end
:loop
wait event
%E = @event()
goto %E
:TAB oneCLICK
:TAB twoCLICK
%2 = @substr(%E,1,-5)
gosub %1CLOSE
shift
gosub %1OPEN
goto loop
:TAB oneOPEN
DIALOG ADD,TEXT,TEXT1,30,15,,,TAB1
OBJECT ADD,GRID,GRID1,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID2,230,134,490,172,1,8,485,20
OBJECT SETCELL,GRID1,ROW,0,TAB1 test
OBJECT SETCELL,GRID1,ROW,1,TAB1 test
OBJECT SETCELL,GRID2,ROW,0,TAB1 test
OBJECT SETCELL,GRID2,ROW,1,TAB1 test
exit
:TAB twoOPEN
DIALOG ADD,TEXT,TEXT2,30,65,,,TAB2
OBJECT ADD,GRID,GRID3,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID4,230,134,490,172,1,8,485,20
OBJECT SETCELL,GRID1,ROW,0,TAB2 test
OBJECT SETCELL,GRID1,ROW,1,TAB2 test
OBJECT SETCELL,GRID2,ROW,0,TAB2 test
OBJECT SETCELL,GRID2,ROW,1,TAB2 test
exit
:TAB oneCLOSE
DIALOG REMOVE,TEXT1
OBJECT REMOVE,GRID1
OBJECT REMOVE,GRID2
exit
:TAB twoCLOSE
DIALOG REMOVE,TEXT2
OBJECT REMOVE,GRID3
OBJECT REMOVE,GRID4
exit
:CLOSE |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Mar 10, 2005 12:06 pm Post subject: |
|
|
Mybe not a false ALARM
Can anyone TRY this code
HOCUS POKUS
REMOVE REM and TRY AGAIN...
external @path(%0)vdsobj.dll
Title TAB test with VDSobj.dll
DIALOG CREATE,TAB test with VDSobj.dll,-1,0,650,510
%%win = @winexists("TAB test with VDSobj.dll")
OBJECT CLASS,%%win
DIALOG ADD,TAB,TAB1,4,6,640,446,TAB one|TAB two
DIALOG SHOW
if @not(%1)
%1 = TAB one
gosub %1OPEN
end
:loop
wait event
%E = @event()
goto %E
:TAB oneCLICK
:TAB twoCLICK
%2 = @substr(%E,1,-5)
gosub %1CLOSE
shift
gosub %1OPEN
goto loop
:TAB oneOPEN
DIALOG ADD,TEXT,TEXT1,30,15,,,TAB1
OBJECT ADD,GRID,GRID1,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID2,230,134,490,172,1,8,485,20
OBJECT SETCELL,GRID1,ROW,0,TAB1 test
OBJECT SETCELL,GRID1,ROW,1,TAB1 test
OBJECT SETCELL,GRID1,ROW,2,TAB1 test
OBJECT SETCELL,GRID1,ROW,3,TAB1 test
OBJECT SETCELL,GRID1,ROW,4,TAB1 test
OBJECT SETCELL,GRID1,ROW,5,TAB1 test
OBJECT SETCELL,GRID1,ROW,6,TAB1 test
rem OBJECT SETCELL,GRID1,ROW,7,TAB1 test
OBJECT SETCELL,GRID2,ROW,0,TAB1 test
OBJECT SETCELL,GRID2,ROW,1,TAB1 test
OBJECT SETCELL,GRID2,ROW,2,TAB1 test
OBJECT SETCELL,GRID2,ROW,3,TAB1 test
OBJECT SETCELL,GRID2,ROW,4,TAB1 test
OBJECT SETCELL,GRID2,ROW,5,TAB1 test
OBJECT SETCELL,GRID2,ROW,6,TAB1 test
rem OBJECT SETCELL,GRID2,ROW,7,TAB1 test
exit
:TAB twoOPEN
DIALOG ADD,TEXT,TEXT2,30,65,,,TAB2
OBJECT ADD,GRID,GRID3,230,30,104,172,1,8,100,20
OBJECT ADD,GRID,GRID4,230,134,490,172,1,8,485,20
OBJECT SETCELL,GRID3,ROW,0,TAB2 test
OBJECT SETCELL,GRID3,ROW,1,TAB2 test
OBJECT SETCELL,GRID4,ROW,0,TAB2 test
OBJECT SETCELL,GRID4,ROW,1,TAB2 test
exit
:TAB oneCLOSE
DIALOG REMOVE,TEXT1
OBJECT REMOVE,GRID1
OBJECT REMOVE,GRID2
exit
:TAB twoCLOSE
DIALOG REMOVE,TEXT2
OBJECT REMOVE,GRID3
OBJECT REMOVE,GRID4
exit
:CLOSE |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Fri Mar 11, 2005 3:36 am Post subject: |
|
|
You are right, I am not certain why it is doing that. It seems to work sometimes but then sometimes not.
Instead of removing the control, how about HIDING it? OBJECT HIDE |
|
| Back to top |
|
 |
|
|
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
|
|