| View previous topic :: View next topic |
| Author |
Message |
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Mon Mar 24, 2003 12:34 pm Post subject: Maxinum # of TEXT dialog items? |
|
|
Hi all,
The application I'm currently developing has a number of tabs.
When selected, each tab contains a number of TEXT items, some EDIT items and occasionally a COMBO item.
I've written subroutines (which use DIALOG SHOW,... or respectively DIALOG HIDE,...)to show and hide the correct items in the dialog if a certain tab is selected.
I'm having problems with one of the tabs (the one I added the last). If I have viewed this tab, and I want to select another tab, the TXT items of the 'old' tab are not cleared. Note that the EDIT items from this particular tab were cleared, only the TXT items remain.
I used the debugger and ran this part of the code step by step, but the program does everything it should. Only the effect in the dialog is, that my TXT items are still there.
I also checked variable names to make sure that I didn't make any typing mistakes (and rechecked them), but I can't find what is going wrong. The correct subroutine is called and everything.
I compiled my program to see if it would behave differently at runtime, but the problem is still there.
I tried my program at a friend's PC who runs VDS 4.50. There the problem seems solved in design mode, but when compiled the problem is still there (even after ensuring that VDSRUN30.DLL was not on his system).
- Does anyone know if there's a limitation on the number of TXT items in a dialog that can be handled? I currently have approx. 25 in total.
- Is there a known way to work around this problem? (or should I use groups then)?
- As a tab item is acting as a group (according to VDS3.51 help), what code do I need to enable or disable a group in my program? This could simplify my routines for clearing the dialog when selecting other tabs.
Thanks in advance for your help.
Regards,
Jan |
|
| Back to top |
|
 |
ACE Valued Newbie

Joined: 05 Sep 2002 Posts: 34
|
Posted: Mon Mar 24, 2003 4:21 pm Post subject: |
|
|
Probably the text controls are not contained in the tab group, are you showing/hiding them via show/hide commands each one ?
Make sure that the controls fall in the bundaries of the tab control group
Have you tried your code on another machine ,with th same version you are working with ?
Lioric |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Mar 24, 2003 8:19 pm Post subject: |
|
|
Are you using any GROUP elements?
I had a problem a long time ago similar to this using the tab... But I
was using group elements and it was complete chaos until I figured
out what to do.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Mar 24, 2003 8:23 pm Post subject: |
|
|
I made some test code and ran it for a minute which generated 6,577
text elements.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Mon Mar 24, 2003 11:43 pm Post subject: |
|
|
@ACE
All my TXT items are in the boundaries of the tab. I created subroutines to show/hide them.
@Garrett
I'm not using any GROUP elements yet. I thought about this, but didn't test with it.
@FreezingFire
I don't really think that the number of TXT elements is the problem. I have problems to hide them (if I don't need them). I think I only have 30-35 of them, so that shouldn't be too difficult.
Rgs,
Jan |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Tue Mar 25, 2003 8:02 pm Post subject: |
|
|
Hiya Mac,
Nice workarounds in your code!
I didn't test the last 2 code pieces, but I am wondering what happens when using the REMOVE method. I presume that if I remove an item from a dialog, its value (e.g. content of an EDIT field) will be lost, right? In such case, the REMOVE method is good for things like radio buttons, buttons and text items as they will have mostly a static value.
I've used your idea of the SETPOS method instead, because I think that suits the best in my application. Nice one
I must say, however, that this type of workaround should not be neccesary and I think that S.A.D.E. should come up with a solution for this. The development environment of VDS 4.50 already shows normal behaviour to the many text items I had in the past (not the .EXE yet), so it looks like it IS possible for them to fix it.
Regards,
Jan |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Mar 25, 2003 8:12 pm Post subject: |
|
|
Here's a workaround for the REMOVE method. This will retain the value of
the control that is recreated:
| Code: | Title Remove Example
DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,BUTTON,RButton,42,20,194,24,Recreate Edit Box
DIALOG ADD,EDIT,REDIT,14,14,210,19,Default value
DIALOG SHOW
:Evloop
wait event
goto @event()
:RButtonBUTTON
%%REDIT = @dlgtext(REDIT)
DIALOG REMOVE,REDIT
DIALOG ADD,EDIT,REDIT,14,14,210,19,%%REDIT
warn The element REDIT has been recreated successfully with a value of: %%REDIT
goto evloop
:Close
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Wed Mar 26, 2003 8:01 am Post subject: |
|
|
This is indeed a workaround I have thought about, but in that way I need quite a lot of variables that temporarily need to contain the values of the original dialog items.
Anyway, thanks for your help.
Rgs,
Jan |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 26, 2003 10:23 am Post subject: |
|
|
Hey Jay,
It is true that elements lose their content when removed, so
SETPOS is prolly gonna be easier if ya have much data to
preserve.
But if ya DO want to remove elements and preserve the data,
ya can use a list instead of taking up so many vars. Would still
take quite a bit more code just to keep everything updated
though.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| 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
|
|