Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
Hello ! De la place pour une petite nouvelle ?
Ma question est très simple, je voudrais paramètrer PB au niveau des couleurs, police et tout et tout pour qu'à la création de chaque objet (fenêtre, DW, bouton, TabPage...) tout soit déjà ok.
Par ailleurs, j'aimerais insérer une image en filigrane sur une fenêtre.
Quelqu'un peut m'aider ?
Merci
PS: Je suis en PB 9
Hors ligne
si tu fais ton image en filigrane sous photoshop par exemple et après tu l'insert dans pb?
Sinon pour ton paramétrage tu n'as pas trouvé ton bonheur dans design..options ?
Hors ligne
Agimation a écrit:
Ma question est très simple, je voudrais paramètrer PB au niveau des couleurs, police et tout et tout pour qu'à la création de chaque objet (fenêtre, DW, bouton, TabPage...) tout soit déjà ok.
dans les propriétés de l'application, bouton "Additional properties", il y a les polices par défaut
Agimation a écrit:
Par ailleurs, j'aimerais insérer une image en filigrane sur une fenêtre.
peut-être en utilisant une API windows ?
Hors ligne
Merci pour ces réponses rapides !
Ah yes, il semblerait qu'on puisse paramètrer les polices... je m'en vais faire un essai.
Et pour les couleurs des objets ?
Ah ah, je sens que je suis tombée au bon endroit
Hors ligne
Je me réjouis toujours trop vite...
En effet, dans les additional properties, on voit les couleurs de texte mais on ne peut pas les changer, par contre on peut changer la police
C'est pas réglé c't'affaire !!
J'offre un chocolat à qui me trouvera la solution !
Hors ligne
Agimation a écrit:
En effet, dans les additional properties, on voit les couleurs de texte mais on ne peut pas les changer
on peut les changer juste pour "Text font"...
Agimation a écrit:
J'offre un chocolat à qui me trouvera la solution !
avec un chocolat t'auras pas beaucoup de succès, ici on est fan de
Hors ligne
Agimation a écrit:
Hello ! De la place pour une petite nouvelle ?
Ma question est très simple, je voudrais paramètrer PB au niveau des couleurs, police et tout et tout pour qu'à la création de chaque objet (fenêtre, DW, bouton, TabPage...) tout soit déjà ok.
Par ailleurs, j'aimerais insérer une image en filigrane sur une fenêtre.
Quelqu'un peut m'aider ?
Merci
PS: Je suis en PB 9
Bonjour et bienvenue sur PowerBuilder à Donf !
Je peux te proposer une solution qui, certes est plus longue, mais te permettra
d'avoir tes objets comme bon te semble : créé toi un framework ! Pas besoin
qu'il soit aussi complet que PFC, PowerLib ou consors, mais simplement tu te
fait tes objets comme tu l'entends, puis tu hérites de ses objets pour ton
application.
Bon courage.
Hors ligne
Agimation a écrit:
En effet, dans les additional properties, on voit les couleurs de texte mais on ne peut pas les changer
En fait, tu peux changer les "text font", mais ni les "column" ni les "headers"
Et pour ça il y a une raison, c'est que pour chaque type de datawindow (freeform, grid, etc..), tu peux paramétrer la couleurs de la colonne et de son header, ainsi que la forme de la bordure.
Crée une nouvelle dataWindow, et quand la boite de dialogue "Select Color and Border settings" apparait met ce que tu veux et coche "save as default"
J'offre un chocolat à qui me trouvera la solution !
Au pur beurre de cacao ?
PS : ma solution complète celle de Dr Z, car la mienne ne s'applique qu'aux objets DataWindows, tandis que celle du docteur s'applique aux contrôles. Du coup, ça te coutera le double en chocolat
Hors ligne
Agimation a écrit:
Je me réjouis toujours trop vite...
En effet, dans les additional properties, on voit les couleurs de texte mais on ne peut pas les changer, par contre on peut changer la police
C'est pas réglé c't'affaire !!
J'offre un chocolat à qui me trouvera la solution !
Si tu utilises Windows XP avec l'interface Luna, ça va être dur je pense ...
Hors ligne
Agimation a écrit:
Hello ! De la place pour une petite nouvelle ?
Une femme !
Cool : yessssssssss
Bienvenue sur le forum
Hors ligne
shahin a écrit:
Une femme !
Cool : yessssssssss
woua l'aut'..., fais gaffe tu vas l'effrayer ! tout doux
c'est si rare que ça des femmes qui font du PB ???
on devrait peut-être ouvrir une rubrique matrimoniale, non ?
Hors ligne
eRaSorZ a écrit:
Aaargh : Ejecté par un modérateur
Hors ligne
Les femmes qui font de l'info déja c'est rare,
PB en info c'est rare,
donc effectivement tout doux, au moindre mouvement suspect ....
Hors ligne
Et si on se concentrait un petit peu sur les réponses ?
Hors ligne
YEP !
Moderez vous un petit peu...
sinon, j'ai fait une petite appli, qui traite justement de ca...
ce n'est pas compliqué...
dans ton objet Fenetre ancetre, tu mets la couleur choisie...
Les couleurs sont stockées sous un fichier ini.
Qui sont recuperées des la connexion de l'applicatif.
FAut juste que tu puisses accéder à une fenetre de palette de couleurs...
Bon si j'ai la forme, (je reviens du foot la...hé oui, on fait du foot, meme pendant le boulot)
je mettrai mon ecran de palettes de couleurs... si ca t'interesse, evidemment...
Hors ligne
Hè hè qu'apprends-je ? Je suis rare ? J'adore !!
Bon, alors si je suis la seule fille ici, je vais essayer de ne pas démériter !
J'implore votre patience... j'ai fait du PB pendant 6-7 ans, et là je reprends après un break de 3 ans, il faut le temps que ça revienne et que je m'adapte à PB9 qui me déroute un peu
Allez, je file bosser sur mes ancêtres puisque ça semble être la seule solution.
A+ les mecs !
Hors ligne
6-7 ans ?
tu n'es pas loin d'un ancetre ?
sinon, pour le parametrage des couleurs... hereeee
Hors ligne
pick ouic a écrit:
YEP !
Moderez vous un petit peu...
Dernière modification par cdtit (18-01-2007 15:04:53)
Hors ligne
Agimation a écrit:
Allez, je file bosser sur mes ancêtres puisque ça semble être la seule solution
Alors ça marche pas mon truc de la boite de dialogue "Select Color and Border settings" ?
Bien sûr ça ne s'applique qu'aux datawindow Objects.
Sinon, si tu as déjà fait du PB, même du PB5.0.4 (moi aussi je suis un ancêtre) tu dois déjà connaitre les extended attribute.
Depuis le fichier d'aide :
extended attribute system tables
A set of five system tables maintained by PowerBuilder where extended attribute definition information related to columns (such as display formats, validation rules, and font information) is stored. When you create a table, you can define extended attributes for the table columns (such as column heads or an edit style for the column). Formerly called the Powersoft repository.
Hors ligne
Agimation a écrit:
Hè hè qu'apprends-je ? Je suis rare ?
J'adore !!
Bon, alors si je suis la seule fille ici, je vais essayer de ne pas démériter !
(Et non tu n'es pas la seule fille ! De mémoire il y aussi poche, wazou et d'autres,
il me semble).
Hors ligne
Voila le petit outil...
A toi d'adapter pour les autres objets...
importe ce fichier <w_toolscolors.srw>
$PBExportHeader$w_toolscolors.srw $PBExportComments$objet de gestion des couleurs... forward global type w_toolscolors from Window end type type pb_annuler from picturebutton within w_toolscolors end type type pb_valider from picturebutton within w_toolscolors end type type pb_1 from picturebutton within w_toolscolors end type type sle_valeur from singlelineedit within w_toolscolors end type type sle_b from singlelineedit within w_toolscolors end type type sle_g from singlelineedit within w_toolscolors end type type sle_r from singlelineedit within w_toolscolors end type type vsb_b from vscrollbar within w_toolscolors end type type vsb_g from vscrollbar within w_toolscolors end type type vsb_r from vscrollbar within w_toolscolors end type type st_1 from statictext within w_toolscolors end type type lb_detail from listbox within w_toolscolors end type type lb_liste from listbox within w_toolscolors end type type lb_objets from listbox within w_toolscolors end type type gb_1 from groupbox within w_toolscolors end type end forward global type w_toolscolors from Window int X=14 int Y=16 int Width=2775 int Height=1796 boolean TitleBar=true string Title="Configuration des couleurs..." boolean ControlMenu=true WindowType WindowType=response! pb_annuler pb_annuler pb_valider pb_valider pb_1 pb_1 sle_valeur sle_valeur sle_b sle_b sle_g sle_g sle_r sle_r vsb_b vsb_b vsb_g vsb_g vsb_r vsb_r st_1 st_1 lb_detail lb_detail lb_liste lb_liste lb_objets lb_objets gb_1 gb_1 end type global w_toolscolors w_toolscolors type variables // Codes couleurs : Ecran, DW Liste, DW Détail Long lnCouleurs[3,4] end variables forward prototypes public subroutine vdappliquer () public subroutine vdlongtorgb (readonly long lncouleur, ref long lncoder, ref long lncodeg, ref long lncodeb) public subroutine vdselectitem (readonly long lnindex) end prototypes public subroutine vdappliquer ();sle_R.Text = String(vsb_R.Position) sle_G.Text = String(vsb_G.Position) sle_B.Text = String(vsb_B.Position) lnCouleurs[lb_Objets.SelectedIndex(),1] = vsb_R.Position lnCouleurs[lb_Objets.SelectedIndex(),2] = vsb_G.Position lnCouleurs[lb_Objets.SelectedIndex(),3] = vsb_B.Position lnCouleurs[1,4] = RGB(lnCouleurs[1,1],lnCouleurs[1,2],lnCouleurs[1,3]) lnCouleurs[2,4] = RGB(lnCouleurs[2,1],lnCouleurs[2,2],lnCouleurs[2,3]) lnCouleurs[3,4] = RGB(lnCouleurs[3,1],lnCouleurs[3,2],lnCouleurs[3,3]) this.BackColor = lnCouleurs[1,4] st_1.backcolor = lnCouleurs[1,4] gb_1.backcolor = lnCouleurs[1,4] lb_liste.BackColor = lnCouleurs[2,4] lb_detail.BackColor = lnCouleurs[3,4] sle_Valeur.Text = String(RGB(vsb_R.Position,vsb_G.Position,vsb_B.Position)) end subroutine public subroutine vdlongtorgb (readonly long lncouleur, ref long lncoder, ref long lncodeg, ref long lncodeb);lnCodeB = Long(lnCouleur) / 65536 lnCodeG = (lnCouleur - (lnCodeB * 65536)) / 256 lnCodeR = lnCouleur - (lnCodeB * 65536) - (lnCodeG * 256) end subroutine public subroutine vdselectitem (readonly long lnindex);lb_Objets.SelectItem(0) lb_Objets.SelectItem(lnIndex) vsb_R.Position = lnCouleurs[lnIndex,1] vsb_G.Position = lnCouleurs[lnIndex,2] vsb_B.Position = lnCouleurs[lnIndex,3] sle_R.Text = String(vsb_R.Position) sle_G.Text = String(vsb_G.Position) sle_B.Text = String(vsb_B.Position) sle_Valeur.Text = String(RGB(vsb_R.Position,vsb_G.Position,vsb_B.Position)) end subroutine on w_toolscolors.create this.pb_annuler=create pb_annuler this.pb_valider=create pb_valider this.pb_1=create pb_1 this.sle_valeur=create sle_valeur this.sle_b=create sle_b this.sle_g=create sle_g this.sle_r=create sle_r this.vsb_b=create vsb_b this.vsb_g=create vsb_g this.vsb_r=create vsb_r this.st_1=create st_1 this.lb_detail=create lb_detail this.lb_liste=create lb_liste this.lb_objets=create lb_objets this.gb_1=create gb_1 this.Control[]={this.pb_annuler,& this.pb_valider,& this.pb_1,& this.sle_valeur,& this.sle_b,& this.sle_g,& this.sle_r,& this.vsb_b,& this.vsb_g,& this.vsb_r,& this.st_1,& this.lb_detail,& this.lb_liste,& this.lb_objets,& this.gb_1} end on on w_toolscolors.destroy destroy(this.pb_annuler) destroy(this.pb_valider) destroy(this.pb_1) destroy(this.sle_valeur) destroy(this.sle_b) destroy(this.sle_g) destroy(this.sle_r) destroy(this.vsb_b) destroy(this.vsb_g) destroy(this.vsb_r) destroy(this.st_1) destroy(this.lb_detail) destroy(this.lb_liste) destroy(this.lb_objets) destroy(this.gb_1) end on event open; if isvalid(w_menu) then f_centre_fenetre(this) end if //lnCouleurs[1,4] = gnv_app.idbl_fond //vdLongToRGB(lnCouleurs[1,4],lnCouleurs[1,1],lnCouleurs[1,2],lnCouleurs[1,3]) //lnCouleurs[2,4] = gnv_app.idbl_liste //vdLongToRGB(lnCouleurs[2,4],lnCouleurs[2,1],lnCouleurs[2,2],lnCouleurs[2,3]) //lnCouleurs[3,4] = gnv_app.idbl_detail //vdLongToRGB(lnCouleurs[3,4],lnCouleurs[3,1],lnCouleurs[3,2],lnCouleurs[3,3]) vdSelectItem(1) vdAppliquer() end event type pb_annuler from picturebutton within w_toolscolors int X=2295 int Y=1580 int Width=425 int Height=96 int TabOrder=50 string Text="&Annuler" string PictureName="annuler.bmp" Alignment HTextAlign=Right! boolean Default=true boolean OriginalSize=true int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type event clicked;close(parent) end event type pb_valider from picturebutton within w_toolscolors int X=1015 int Y=1580 int Width=425 int Height=96 int TabOrder=40 string Text="&Valider" string PictureName="valider.bmp" Alignment HTextAlign=Right! boolean OriginalSize=true int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type event clicked;integer li_Net li_Net = MessageBox("Information", "Etes-vous sur de vouloir valider ?",question!, yesno!, 2) IF li_Net = 1 THEN // Process OK. ELSE // Process CANCEL. return END IF //gnv_app.idbl_fond = lnCouleurs[1,4] //gnv_app.idbl_liste = lnCouleurs[2,4] //gnv_app.idbl_detail = lnCouleurs[3,4] // gestion des couleurs SetProfileString("pbadonf.ini", "couleurs", "fond",string(lnCouleurs[1,4])) SetProfileString("pbadonf.ini", "couleurs", "liste",string(lnCouleurs[2,4])) SetProfileString("pbadonf.ini", "couleurs", "detail",string(lnCouleurs[3,4])) Close(Parent) end event type pb_1 from picturebutton within w_toolscolors int X=485 int Y=1592 int Width=142 int Height=84 int TabOrder=30 string Text="ok" int TextSize=-8 int Weight=700 string FaceName="Times New Roman" FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type event clicked;Long lnValeur Long lnR Long lnG Long lnB lnValeur = Long(sle_Valeur.Text) vdLongToRGB(lnValeur,lnR,lnG,lnB) vsb_R.Position = lnR vsb_G.Position = lnG vsb_B.Position = lnB vdAppliquer() end event type sle_valeur from singlelineedit within w_toolscolors int X=27 int Y=1600 int Width=439 int Height=76 int TabOrder=20 boolean AutoHScroll=false long TextColor=33554432 int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type type sle_b from singlelineedit within w_toolscolors int X=782 int Y=1468 int Width=174 int Height=76 boolean Enabled=false boolean AutoHScroll=false long TextColor=33554432 int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type type sle_g from singlelineedit within w_toolscolors int X=453 int Y=1468 int Width=174 int Height=76 boolean Enabled=false boolean AutoHScroll=false long TextColor=33554432 int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type type sle_r from singlelineedit within w_toolscolors int X=82 int Y=1468 int Width=174 int Height=76 boolean Enabled=false boolean AutoHScroll=false long TextColor=33554432 int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type type vsb_b from vscrollbar within w_toolscolors event linedown pbm_sbnlinedown event lineup pbm_sbnlineup event moved pbm_sbnthumbtrack event pagedown pbm_sbnpagedown event pageup pbm_sbnpageup int X=827 int Y=340 int Width=82 int Height=1120 boolean Enabled=false boolean BringToTop=true boolean StdWidth=false int MaxPosition=255 end type event linedown;This.Position = Min(This.Position + 1,This.MaxPosition) vdAppliquer() end event event lineup;This.Position = Max(This.Position - 1,This.MinPosition) vdAppliquer() end event event moved;This.Position = ScrollPos vdAppliquer() end event event pagedown;This.Position = Min(This.Position + 15,This.MaxPosition) vdAppliquer() end event event pageup;This.Position = Min(This.Position - 15,This.MaxPosition) vdAppliquer() end event type vsb_g from vscrollbar within w_toolscolors event linedown pbm_sbnlinedown event lineup pbm_sbnlineup event moved pbm_sbnthumbtrack event pagedown pbm_sbnpagedown event pageup pbm_sbnpageup int X=498 int Y=340 int Width=82 int Height=1120 boolean Enabled=false boolean BringToTop=true boolean StdWidth=false int MaxPosition=255 end type event linedown;This.Position = Min(This.Position + 1,This.MaxPosition) vdAppliquer() end event event lineup;This.Position = Max(This.Position - 1,This.MinPosition) vdAppliquer() end event event moved;This.Position = ScrollPos vdAppliquer() end event event pagedown;This.Position = Min(This.Position + 15,This.MaxPosition) vdAppliquer() end event event pageup;This.Position = Min(This.Position - 15,This.MaxPosition) vdAppliquer() end event type vsb_r from vscrollbar within w_toolscolors event linedown pbm_sbnlinedown event lineup pbm_sbnlineup event moved pbm_sbnthumbtrack event pagedown pbm_sbnpagedown event pageup pbm_sbnpageup int X=128 int Y=340 int Width=82 int Height=1120 boolean Enabled=false boolean BringToTop=true boolean StdWidth=false int MaxPosition=255 end type event linedown;This.Position = Min(This.Position + 1,This.MaxPosition) vdAppliquer() end event event lineup;This.Position = Max(This.Position - 1,This.MinPosition) vdAppliquer() end event event moved;This.Position = ScrollPos vdAppliquer() end event event pagedown;This.Position = Min(This.Position + 15,This.MaxPosition) vdAppliquer() end event event pageup;This.Position = Min(This.Position - 15,This.MaxPosition) vdAppliquer() end event type st_1 from statictext within w_toolscolors int X=101 int Y=272 int Width=869 int Height=76 boolean Enabled=false string Text="Rouge Vert Bleu" boolean FocusRectangle=false long TextColor=33554432 int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type type lb_detail from listbox within w_toolscolors int X=1015 int Y=804 int Width=1705 int Height=760 boolean Enabled=false boolean BringToTop=true BorderStyle BorderStyle=StyleLowered! boolean Sorted=false long TextColor=33554432 int TextSize=-11 int Weight=400 string FaceName="Times New Roman" FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! string Item[]={"azertyuiop",& " 0123456789",& "azertyuiop azertyuiop",& " 0123456789 azertyuiop",& "poiuytreza"} end type type lb_liste from listbox within w_toolscolors int X=1015 int Y=28 int Width=1705 int Height=760 boolean Enabled=false boolean BringToTop=true BorderStyle BorderStyle=StyleLowered! boolean VScrollBar=true boolean Sorted=false long TextColor=33554432 int TextSize=-11 int Weight=400 string FaceName="Times New Roman" FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! string Item[]={"azertyuiop",& "0123456789",& "azertyuiopazertyuiop",& "01234567890123456789",& "poiuytreza",& "9876543210"} end type type lb_objets from listbox within w_toolscolors event selectionchanged pbm_lbnselchange int X=27 int Y=28 int Width=969 int Height=208 int TabOrder=10 boolean BringToTop=true BorderStyle BorderStyle=StyleLowered! boolean Sorted=false long TextColor=33554432 int TextSize=-10 int Weight=400 string FaceName="Times New Roman" FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! string Item[]={"Fond d'écran",& "Listes",& "Détail"} end type event selectionchanged;vdSelectItem(Index) end event type gb_1 from groupbox within w_toolscolors int X=27 int Y=224 int Width=969 int Height=1340 BorderStyle BorderStyle=StyleLowered! long TextColor=33554432 long BackColor=33554431 int TextSize=-10 int Weight=700 string FaceName="Times New Roman" FontCharSet FontCharSet=Ansi! FontFamily FontFamily=Roman! FontPitch FontPitch=Variable! end type
Hors ligne
Ok ok ! Merci pour votre aide les gars !
Ce que je voulais faire au départ n'est donc pas possible visiblement mais j'ai pu trouver une solution satisfaisante via les ancêtres... on verra à l'usage !
Alors encore merci et bien le bonjour de la vieille
Hors ligne
Agimation a écrit:
Alors encore merci et bien le bonjour de la vieille
DE RIEN, VIEILLE BRANCHE !
Hors ligne