Raise a ProgressBar to be Above other Controls
Moderator: Rathinagiri
-
Red2
- Posts: 282
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Raise a ProgressBar to be Above other Controls
Hi All,
Question:
How can I programmatically raise a ProgressBar control on a Form so it becomes the very TOPMOST Control?
I want to be able to raise it to display above all other form controls (such as Button, Label, or TextBox).
That is, raise its "Z-Order".
I would really appreciate any guidance. Thank you!
============================================
Pregunta:
¿Cómo puedo generar programáticamente un control ProgressBar en un formulario para que se convierta en el control TOPMOST?
Quiero poder elevarlo para que se muestre por encima de todos los demás controles de formulario (como Botón, Etiqueta o Cuadro de texto).
Es decir, elevar su "Z-Order".
Realmente agradecería cualquier orientación. ¡Gracias!
Red2
Question:
How can I programmatically raise a ProgressBar control on a Form so it becomes the very TOPMOST Control?
I want to be able to raise it to display above all other form controls (such as Button, Label, or TextBox).
That is, raise its "Z-Order".
I would really appreciate any guidance. Thank you!
============================================
Pregunta:
¿Cómo puedo generar programáticamente un control ProgressBar en un formulario para que se convierta en el control TOPMOST?
Quiero poder elevarlo para que se muestre por encima de todos los demás controles de formulario (como Botón, Etiqueta o Cuadro de texto).
Es decir, elevar su "Z-Order".
Realmente agradecería cualquier orientación. ¡Gracias!
Red2
Re: Raise a ProgressBar to be Above other Controls
Maybe...
Code: Select all
DEFINE WINDOW _ProgressBar AT 0 , 0 WIDTH 100 HEIGHT 25 NOSYSMENU NOCAPTION NOSIZE ;
NOMINIMIZE NOMAXIMIZE TOPMOST
@ <nRow> ,<nCol> PROGRESSBAR<ControlName> OF <ParentWindowName> RANGE <nRangeMin> , <nRangeMax> ;
WIDTH 100 HEIGHT 25
END WINDOW
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
-
Red2
- Posts: 282
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Raise a ProgressBar to be Above other Controls
Hello andyglezl,
Gracias por su amable sugerencia. En realidad, tengo un problema diferente.
Ya tengo un ProgressBar cuya propiedad VISIBLE inicial es .F. esta escondido
Posteriormente, para mostrar el progreso, su propiedad VISIBLE se cambia a .T.
El problema:
Al principio, sin embargo, ProgressBar aparece debajo (en el eje Z) de otros controles.
Pregunta:
¿Hay algún comando HMG para cambiar mediante programación el orden "3-D" (eje Z) de los controles superpuestos?
=====================================================================================================
Thank you for your kind suggestion. Actually, I have a different problem.
I already have a ProgressBar whose initial VISIBLE property is .F. It is hidden.
Later, to display progress its VISIBLE property is changed to .T.
The Problem:
At first, however, the ProgressBar appears below (in the Z axis) other controls.
Question:
Is there some HMG command to programmatically change the "3-D" (Z axis) order of overlapping controls?
I would appreciate any guidance.
Red2
Gracias por su amable sugerencia. En realidad, tengo un problema diferente.
Ya tengo un ProgressBar cuya propiedad VISIBLE inicial es .F. esta escondido
Posteriormente, para mostrar el progreso, su propiedad VISIBLE se cambia a .T.
El problema:
Al principio, sin embargo, ProgressBar aparece debajo (en el eje Z) de otros controles.
Pregunta:
¿Hay algún comando HMG para cambiar mediante programación el orden "3-D" (eje Z) de los controles superpuestos?
=====================================================================================================
Thank you for your kind suggestion. Actually, I have a different problem.
I already have a ProgressBar whose initial VISIBLE property is .F. It is hidden.
Later, to display progress its VISIBLE property is changed to .T.
The Problem:
At first, however, the ProgressBar appears below (in the Z axis) other controls.
Question:
Is there some HMG command to programmatically change the "3-D" (Z axis) order of overlapping controls?
I would appreciate any guidance.
Red2
- vagblad
- Posts: 174
- Joined: Tue Jun 18, 2013 12:18 pm
- DBs Used: MySQL,DBF
- Location: Thessaloniki, Greece
Re: Raise a ProgressBar to be Above other Controls
Hello Red
Unfortunately and as far as i know there is no "strata" or layers for controls in Harbour. So no Z-axis utilization whatsoever. The way the controls are being displayed is by the order they were defined in the prg or fmg file. So if Textbox_1 was defined before Label_1 and they have the same row and col values, the label control will overlap the textbox one.
The thing is though that hovering over the controls will show the control from below. I had a similar problem with a pop-up virtual grid which we use for some search functions.
The thing i do is what Andres proposed above. Whenever i want a control to overlap all the others i make a child window with the topmost property set to .T. and make it exactly the same size as the control i want to show. It's not "clean" but it works.
Unfortunately and as far as i know there is no "strata" or layers for controls in Harbour. So no Z-axis utilization whatsoever. The way the controls are being displayed is by the order they were defined in the prg or fmg file. So if Textbox_1 was defined before Label_1 and they have the same row and col values, the label control will overlap the textbox one.
The thing is though that hovering over the controls will show the control from below. I had a similar problem with a pop-up virtual grid which we use for some search functions.
The thing i do is what Andres proposed above. Whenever i want a control to overlap all the others i make a child window with the topmost property set to .T. and make it exactly the same size as the control i want to show. It's not "clean" but it works.
Code: Select all
DEFINE WINDOW Grid_Form AT nCol , nRow WIDTH 570 HEIGHT 530 CHILD NOSIZE NOSYSMENU NOCAPTION TOPMOST BACKCOLOR {0,101,149}
DEFINE GRID Grid_Search
ROW 0
COL 0
WIDTH 570
HEIGHT 530
WIDTHS { 70, 300, 80, 100 }
HEADERS { '', '', '', ''}
FONTNAME mainFont
FONTSIZE smallFontSize
TOOLTIP ''
JUSTIFY { 2, 0, 1, 1 }
NOTABSTOP .F.
PAINTDOUBLEBUFFER .T.
VISIBLE .T.
SHOWHEADERS .T.
NOLINES .F.
READONLY .T.
VIRTUAL .T.
ITEMCOUNT len(aQueryData)
ON QUERYDATA QueryVirtual(aQueryData,this.name)
ON DBLCLICK GridSearchEnter(cForm,cControl,this.value)
END GRID
END WINDOW
Vagelis Prodromidis
Email: vagblad@gmail.com, Skype: vagblad
Email: vagblad@gmail.com, Skype: vagblad
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Raise a ProgressBar to be Above other Controls
hi Red,
not a Solution, more Design Question :
why is your Progressbar "so big"
my Progressbar are only 3 Pixel height just below Titlebar at 0,0
not a Solution, more Design Question :
why is your Progressbar "so big"
my Progressbar are only 3 Pixel height just below Titlebar at 0,0
have fun
Jimmy
Jimmy
Re: Raise a ProgressBar to be Above other Controls
You can set the Row, Col, Width and Height of progress bar.
Code: Select all
DEFINE PROGRESSBAR Progress_1
ROW 10
COL 10
WIDTH 300
HEIGHT 15
BACKCOLOR GREEN
FORECOLOR RED
END PROGRESSBAR
All The Best,
Franco
Canada
Franco
Canada
-
Red2
- Posts: 282
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Raise a ProgressBar to be Above other Controls
Hi Jimmy,
Thank you for your response. That is a fair question.
These report calculations take a bit of time.
Here there is an additional consideration for an accompanying _HMG_CHILDWAITWINDOW.
Overall it's just a design decision that seems to work here.
FWIW, coming from VFP I assumed that HMG had some functionality to
raise one control to ABOVE / ON TOP OF another control.
Lacking a Z-order ability I have made do without one.
It now seems to work out reasonably well.
Red2
Thank you for your response. That is a fair question.
These report calculations take a bit of time.
Here there is an additional consideration for an accompanying _HMG_CHILDWAITWINDOW.
Overall it's just a design decision that seems to work here.
FWIW, coming from VFP I assumed that HMG had some functionality to
raise one control to ABOVE / ON TOP OF another control.
Lacking a Z-order ability I have made do without one.
It now seems to work out reasonably well.
Red2
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: Raise a ProgressBar to be Above other Controls
Hola Red2, la verdad es que un poco complicado, si haces el control TOPMOST pero no lo haces MODEL el usuario puede interactuar con el resto de opciones, botones, etc, que hay en la pantalla de bajo y puede ocasionar un lio, ya que se puede reenviar el listado, o la factura, cancelar y generar multiples errores.Red2 wrote: ↑Wed Apr 06, 2022 10:58 pm Hi All,
Pregunta:
¿Cómo puedo generar programáticamente un control ProgressBar en un formulario para que se convierta en el control TOPMOST?
Quiero poder elevarlo para que se muestre por encima de todos los demás controles de formulario (como Botón, Etiqueta o Cuadro de texto).
Es decir, elevar su "Z-Order".
Realmente agradecería cualquier orientación. ¡Gracias!
Red2
Después de muchas vueltas yo utilizo es rutina que te paso seguidamente.
Es muy facil de llamar y de actualizar cada paso.
Crea una ventana MODAL, por lo que hasta que no termina el proceso el usuario no puede cambiar de opcion y evitas conflictos.
Un saludo a todos los hombre de buena fe que solo quieren la PAZ, y una cervecita fresquita !!!
- Attachments
-
- BarraProgreso.rar
- (1.21 MiB) Downloaded 139 times
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. 
-
Red2
- Posts: 282
- Joined: Sat May 18, 2019 2:11 pm
- DBs Used: Visual FoxPro, FoxPro
- Location: United States of America
Re: Raise a ProgressBar to be Above other Controls
Hola SALINETAS 24,
Realmente me gusta su implementación creativa de la barra de progreso.
Lo que tengo actualmente funciona ahora adecuadamente.
Estoy guardando tu código para uso futuro.
¡Gracias de nuevo!
========================================================
I really like your creative ProgressBar implimentation.
What I currently have works now adequately.
I'm saving your code for future use.
Thanks again!
Red2
Realmente me gusta su implementación creativa de la barra de progreso.
Lo que tengo actualmente funciona ahora adecuadamente.
Estoy guardando tu código para uso futuro.
¡Gracias de nuevo!
========================================================
I really like your creative ProgressBar implimentation.
What I currently have works now adequately.
I'm saving your code for future use.
Thanks again!
Red2