Text Box Update

HMG en Español

Moderator: Rathinagiri

Post Reply
franco
Posts: 818
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Text Box Update

Post by franco »

Having trouble updating text box value.
I am in a window with a grid and some text boxes
to update the grid and text boxes i have a function as follows. The grid emptys but the text boxes do not refresh to zero.
there must be something I am missing to update the text boxes values.
if I put a message box at the bottom, the text boxes refresh

function prpr3()
FORM_GRID_IN2.GRID_2.itemcount := 0
FORM_GRID_IN2.Text_6.Value := 0
FORM_GRID_IN2.Text_7.Value := 0
FORM_GRID_IN2.Text_8.Value := 0
FORM_GRID_IN2.Text_9.Value := 0
FORM_GRID_IN2.Text_10.Value := 0
FORM_GRID_IN2.Text_12.Value := 0
FORM_GRID_IN2.Text_13.Value := 0
FORM_GRID_IN2.Text_14.Value := 0
FORM_GRID_IN2.Text_15.Value := 0
FORM_GRID_IN2.Text_16.Value := 0
FORM_GRID_IN2.Text_17.Value := 0
FORM_GRID_IN2.Text_18.Value := ''
FORM_GRID_IN2.Text_19.Value := 0
FORM_GRID_IN2.Text_20.Value := 0
FORM_GRID_IN2.Text_21.Value := 0
FORM_GRID_IN2.Text_22.Value := 0
FORM_GRID_IN2.Text_23.Value := 0
DO EVENTS // added and now works as Pablo suggested.



RETURN



I updated this function for others to view. This works
Thanks Franco
Last edited by franco on Sun Mar 26, 2017 8:31 pm, edited 3 times in total.
All The Best,
Franco
Canada
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Text Box Update

Post by Pablo César »

Do Events, en lugar de MsgBox ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
franco
Posts: 818
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Text Box Update

Post by franco »

Thank you for quick response Pablo
is there a way to empty the grid before up date instead of visible .f.
I tried deleteallitems but does not update. If I use itemcount := 0. the grid disappears ... looks funny.
All The Best,
Franco
Canada
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Text Box Update

Post by Pablo César »

Si utiliza los elementos de eliminación se vacía la matriz. Entonces necesitará agregar uno a uno.
Creo que hay una manera atravez de una función en C. No me acuerdo ahora.
 
Googled
If you use the deleteallitems will empty the array. Then you will nedd to additem one by one.
I think there a way in C function. I do not remember now.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
franco
Posts: 818
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Text Box Update

Post by franco »

Now working and all is well.
This forum and HMG is amazing.
Thanks again........ Franco
All The Best,
Franco
Canada
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Text Box Update

Post by Pablo César »

Qué bueno que conseguiste ! :D
franco wrote: Fri Mar 24, 2017 7:58 pm This forum and HMG is amazing.
Yes, really is.

Otra idea, seria: eliminando el control Grid e recriarlo nuevamente con la matriz ya elaborada.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply