Page 1 of 1
Picture Property
Posted: Thu Jan 20, 2011 2:10 am
by danielmaximiliano
Hi :
I'm trying to figure out how it works
Picture Property
<ParentWindowName>.<ControlName>.Picture := cImageName
<ParentWindowName>.<ControlName>.Picture --> cImageName
container
TAB accepted indices as a reference to the page I mean
Code: Select all
this works Principal.Container_Tab(nX).&(cImage).Width := Principal.Width - 30
however does not Principal.Container_Tab(nPage).Picture := "Unselect.bmp"
I find no specific example of property management within the container TAB pages
only simple WindowName.ControlName.Value
or a little more complex Form_1.Tab_1 (1). Grid_1.Caption (1) in ..\hmg.3.0.35\SAMPLES\MAIN.DEMO
Español
estoy intentando saber como funciona
Picture Property
<ParentWindowName>.<ControlName>.Picture := cImageName
<ParentWindowName>.<ControlName>.Picture --> cImageName
el contenedor
TAB acepta indices como referencia a la pagina que me refiero
Code: Select all
esto funciona Principal.Container_Tab(nX).&(cImage).Width := Principal.Width - 30
sin enbargo esto no Principal.Container_Tab(nPage).Picture := "Unselect.bmp"
no encuentro ejemplo especificos del manejo propiedades de paginas dentro del contenedor TAB
solo el simple WindowName.ControlName.Value
o un poco mas complejo Form_1.Tab_1(1).Grid_1.Caption(1) en ..\hmg.3.0.35\SAMPLES\MAIN.DEMO
Saludos / Greetings
DaNiElMaXiMiLiAnO
Re: Picture Property
Posted: Thu Jan 20, 2011 8:26 am
by gfilatov
Hello Daniel,
Please take a look for updated sample from your folder \hmg\samples\CONTAINERS\Tab below:
Code: Select all
/*
* HMG - Harbour Win32 GUI library Demo
*
* Copyright 2008 Roberto Lopez <mail.box.hmg@gmail.com>
* http://sites.google.com/site/hmgweb/
*/
#include "hmg.ch"
Function Main
Local aRows [20] [3]
aRows [1] := {'Simpson','Homer','555-5555'}
aRows [2] := {'Mulder','Fox','324-6432'}
aRows [3] := {'Smart','Max','432-5892'}
aRows [4] := {'Grillo','Pepe','894-2332'}
aRows [5] := {'Kirk','James','346-9873'}
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'HMG Demo' ;
MAIN
DEFINE MAIN MENU
DEFINE POPUP 'Test'
MENUITEM 'Get Image Picture' ACTION MsgInfo ( Form_1.Tab_1(1).Image_1.Picture )
MENUITEM 'Set Image Picture' ACTION Form_1.Tab_1(1).Image_1.Picture := 'hmg.gif'
SEPARATOR
MENUITEM 'Get Button Caption' ACTION MsgInfo ( Form_1.Tab_1(1).Button_1.Caption )
MENUITEM 'Set Button Caption' ACTION Form_1.Tab_1(1).Button_1.Caption := 'New'
SEPARATOR
MENUITEM 'Get Grid Header' ACTION MsgInfo ( Form_1.Tab_1(4).Grid_1.Header(1) )
MENUITEM 'Set Grid Header' ACTION Form_1.Tab_1(4).Grid_1.Header(1) := 'New'
SEPARATOR
MENUITEM 'Set Grid Cell' ACTION Form_1.Tab_1(4).Grid_1.Cell(1,1) := 'New'
MENUITEM 'Get Grid Cell' ACTION MsgInfo ( Form_1.Tab_1(4).Grid_1.Cell(1,1) )
SEPARATOR
MENUITEM 'Show Button' ACTION Form_1.Tab_1(1).Button_1.Show()
MENUITEM 'Hide Button' ACTION Form_1.Tab_1(1).Button_1.Hide()
END POPUP
END MENU
DEFINE TAB Tab_1 ;
AT 10,10 ;
WIDTH 600 ;
HEIGHT 400 ;
VALUE 1 ;
TOOLTIP 'Tab Control'
PAGE 'Page 1' IMAGE "exit.bmp"
DEFINE IMAGE Image_1
ROW 40
COL 10
HEIGHT 110
WIDTH 230
PICTURE 'demo.gif'
STRETCH .F.
END IMAGE
@ 100,250 BUTTON Button_1 CAPTION "Test" WIDTH 50 HEIGHT 50 ACTION MsgInfo('Test!')
END PAGE
PAGE 'Page &2' IMAGE "info.bmp"
DEFINE RADIOGROUP R1
ROW 100
COL 100
OPTIONS { '1','2','3' }
VALUE 1
END RADIOGROUP
END PAGE
PAGE 'Page 3' IMAGE "check.bmp"
@ 100,250 SPINNER Spinner_1 ;
RANGE 0,10 ;
VALUE 5 ;
WIDTH 100 ;
TOOLTIP 'Range 0,10' ;
ON CHANGE PlayBeep()
END PAGE
PAGE 'Page 4' IMAGE "button.bmp"
@ 50,50 GRID Grid_1 ;
WIDTH 200 ;
HEIGHT 330 ;
HEADERS {'Last Name','First Name','Phone'} ;
WIDTHS {140,140,140};
ITEMS aRows ;
VALUE 1
END PAGE
END TAB
END WINDOW
Form_1.Center
Form_1.Activate
Return Nil
Hope that give you an idea

Re: Picture Property
Posted: Thu Jan 20, 2011 3:36 pm
by danielmaximiliano
Hi Grigory :
try this
Code: Select all
Procedure UnSelectPage()
FOR nCounter := 1 TO nPage - 1
Principal.Container_Tab(nCounter).Picture := "Unselect.bmp"
NEXT
RETURN
to select a tab page of the other pages should display an image
"Unselect".
Re: Picture Property
Posted: Thu Jan 20, 2011 7:18 pm
by gfilatov
danielmaximiliano wrote:Hi Grigory :
try this
Code: Select all
Procedure UnSelectPage()
FOR nCounter := 1 TO nPage - 1
Principal.Container_Tab(nCounter).Picture := "Unselect.bmp"
NEXT
RETURN
to select a tab page of the other pages should display an image
"Unselect".
Hi Daniel,
You are right!
The official HMG have
only 'Caption(nPage)' property of Tab's pages for dynamical change at runtime.
BTW There is
Image property of Tab's pages in the HMG Extended Edition, i.e.
Form_1.Tab_1.Image( 1 ) := 'Unselect.Bmp'
Re: Picture Property
Posted: Thu Jan 20, 2011 7:47 pm
by danielmaximiliano
Thanks Grigory
Extended tonight proves
Saludos / Regard
DaNiElMaXiMiLiAnO
Re: Picture Property
Posted: Sat Jan 22, 2011 1:44 am
by danielmaximiliano
Hi Everyone:
Find in HMG.4 I can add a picture of PAGE, PAGE disable you want, give Backcolor the TAB or PAGE, is whether ... all I wanted to do in HMG3.x and could not.
Code: Select all
Page1: Image: = 'open.png'
Tab1: Position: = TAB_TOP
Tab1: Shape: = TAB_TRIANGULAR
Example I am now migrating to take on new qualities of HMG.4 with QT.
Greetings
Español
Hola a Todos :
Encontre en HMG.4 que puedo agregar una imagen del PAGE, desactivar los PAGE que quiera, dar el Backcolor al TAB o al PAGE, es si... todo lo que queria hacer en HMG3.x y no podia.
Code: Select all
Page1:Image := 'open.png'
Tab1:Position := TAB_TOP
Tab1:Shape := TAB_TRIANGULAR
ahora estoy migrando el Ejemplo para asumir las nuevas cualidades de HMG.4 con QT.
Saludos
DaNiElMaXiMiLiAnO