Home » Developer & Programmer » Forms » How to redrawing items in a form?
How to redrawing items in a form? [message #296606] Mon, 28 January 2008 06:43 Go to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
I've a form which contains items.
when i chaged a list in this form some items should appear and some shouldn't,My problem is to get ride of the space between items i redrawing the items and this operation takes time.
Is there any way to do this whith out redrawing the items.

Regards
Re: How to redrawing items in a form? [message #296613 is a reply to message #296606] Mon, 28 January 2008 07:10 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What does this mean?
Quote:
i chaged a list in this form


Are we talking about design or runtime "redrawing"?
Re: How to redrawing items in a form? [message #296776 is a reply to message #296613] Tue, 29 January 2008 00:58 Go to previous messageGo to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
I'm talking in runtime
Regards
Re: How to redrawing items in a form? [message #296802 is a reply to message #296776] Tue, 29 January 2008 01:58 Go to previous messageGo to next message
akramrabaya
Messages: 41
Registered: November 2007
Member

make a cade using this function


SET_ITEM_PROPERTY('item_id',position,x,y);


x , y numbers to indicate the item location



akram
Re: How to redrawing items in a form? [message #296804 is a reply to message #296802] Tue, 29 January 2008 02:03 Go to previous messageGo to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
Thanks for reply.
I've tried this solution before but it takes a lot of time.
Is there another way to do that.

Regards
Re: How to redrawing items in a form? [message #297027 is a reply to message #296804] Tue, 29 January 2008 23:19 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
In which trigger are you doing this? It should only take milliseconds to move a field? How many 'synchronize' statements do you have in your code? Can you get the same effect using only a single 'synchronize'?

David
Re: How to redrawing items in a form? [message #297102 is a reply to message #297027] Wed, 30 January 2008 02:47 Go to previous messageGo to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
Thanks for your reply.
I'm doing this in when_list_change and my problem inaddition to the time it takes is how to detirmind the nearest item to get his position.
Regards

Re: How to redrawing items in a form? [message #297264 is a reply to message #297102] Wed, 30 January 2008 22:29 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
ALWAYS define the items in the order in which they will appear on the canvas. Use get_block_property's 'first_item' and 'last_item' to control a loop inside which you use get_item_property's facility to go from item to item to see whether it is enabled and needs to be moved.

Remember to ONLY do a synchronize when ALL the items have been redefined.

David
Re: How to redrawing items in a form? [message #297344 is a reply to message #297264] Thu, 31 January 2008 03:39 Go to previous messageGo to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
Do you mean that i should should wirte 'synchronize' after redifineding all items?
Regards,
Re: How to redrawing items in a form? [message #297470 is a reply to message #297344] Thu, 31 January 2008 21:43 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Yes. What have you been doing?

David
Re: How to redrawing items in a form? [message #297730 is a reply to message #297470] Sun, 03 February 2008 02:04 Go to previous messageGo to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
Thanks David for your help.
I've been eriting 'synchronize' after redifineding each item.
Regards
Re: How to redrawing items in a form? [message #297826 is a reply to message #297730] Sun, 03 February 2008 23:00 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Stop that. Just do a synchronize one time.

David
Re: How to redrawing items in a form? [message #297859 is a reply to message #297826] Mon, 04 February 2008 00:56 Go to previous messageGo to next message
nadia74
Messages: 85
Registered: August 2007
Member
Hi,
I've another problem.
When i tried to redrawing the scrollbar it didn't move to the write place.I've wirte:
set_block_property(blockname,blockscrollbar_x_pos,number);
What is the problem in your opinion.
Regards
Re: How to redrawing items in a form? [message #298066 is a reply to message #297859] Mon, 04 February 2008 22:14 Go to previous message
misragopal
Messages: 125
Registered: June 2005
Location: New Delhi, india
Senior Member

Use below code to re-position your scrollbar. you need to specify block name, x and y positions.
SET_BLOCK_PROPERTY('Block_name', BLOCKSCROLLBAR_POSITION, x-position,y-position);
Previous Topic: Insert OCX Object Programatically
Next Topic: Explorer 7 Closes directly
Goto Forum:
  


Current Time: Fri Dec 09 15:26:02 CST 2016

Total time taken to generate the page: 0.15616 seconds