encore mes problemes de langues phonetique, mais je programme un truc avec du texte hebreu, et evidement il faut tout afficher de droite a gauche
pour les bouttons et le texte il y a une option (merci fred) d'afficher a droite, mais d'autres gadgets (par exemple la listicon) non
y aurait pas une petite api qui reglerait l'affaire?
listicon a droite
-
- Messages : 446
- Inscription : mar. 25/mai/2010 17:24
- Localisation : Bnei Brak, Israel
- falsam
- Messages : 7324
- Inscription : dim. 22/août/2010 15:24
- Localisation : IDF (Yvelines)
- Contact :
Re: listicon a droite
La fonction ReverseString() associé au code ci-dessous devrait t'aider (J’espère)
PS : ReverseString n'est peut être pas utile si tu as déjà la traduction du mot en hébreu
Au cas ou tu aurais besoin d'installer une police hébraïque
Code : Tout sélectionner
Procedure JustifyColumn(Gadget, Column, FMT)
Lvc.LV_COLUMN
Lvc\Mask = #LVCF_FMT
Select FMT
Case 0
Lvc\FMT = #LVCFMT_LEFT
Case 1
Lvc\FMT = #LVCFMT_CENTER
Case 2
Lvc\FMT = #LVCFMT_RIGHT
EndSelect
SendMessage_(GadgetID(Gadget), #LVM_SETCOLUMN, Column, @Lvc)
EndProcedure
If OpenWindow(0, 100, 100, 500, 100, "ListIconGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 490, 90, "Nom", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "Adresse", 250)
AddGadgetItem(0, -1, "Bonjour"+Chr(10)+ReverseString("Bonjour"))
AddGadgetItem(0, -1, "Au revoir"+Chr(10)+ReverseString("Au revoir"))
JustifyColumn(0, 1, 2)
Repeat
Evenement = WaitWindowEvent()
Until Evenement = #PB_Event_CloseWindow
EndIf
Au cas ou tu aurais besoin d'installer une police hébraïque
Configuration : Windows 11 Famille 64-bit - PB 6.20 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
-
- Messages : 446
- Inscription : mar. 25/mai/2010 17:24
- Localisation : Bnei Brak, Israel
Re: listicon a droite
merci
mon ordi est en reparation, je verrais donc la semaine prochaine
sur le fofo uk ils m'ont donne un super truc
ca retourne toute la fenetre
mon ordi est en reparation, je verrais donc la semaine prochaine
sur le fofo uk ils m'ont donne un super truc
Code : Tout sélectionner
#LAYOUT_RTL = 1
SetProcessDefaultLayout_(#Layout_rtl)
Re: listicon a droite
Effectivement, ça retourne toute la fenêtre.



-
- Messages : 446
- Inscription : mar. 25/mai/2010 17:24
- Localisation : Bnei Brak, Israel
Re: listicon a droite
c'est une api geniale, le seul probleme est que j'edite mes windows avec pureform et maintenant je dois tout faire a l'envers
Re: listicon a droite
Ceci dit, tu n'est pas plus avancé.
Les textes sont alignés à droite, mais ils s'écrivent toujours de gauche à droite.
Les textes sont alignés à droite, mais ils s'écrivent toujours de gauche à droite.
Re: listicon a droite
On peut aussi s'amuser avec #WS_EX_LAYOUTRTL:
Code : Tout sélectionner
If OpenWindow(0, 450, 200, 390, 341, "Texte de droite à gauche", #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
ListIconGadget(0, 52, 41, 307, 200, "1", 100, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection | #PB_ListIcon_GridLines)
SetWindowLongPtr_(GadgetID(0), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(0), #GWL_EXSTYLE) | #WS_EX_LAYOUTRTL)
SetWindowLongPtr_(SendMessage_(GadgetID(0), #LVM_GETHEADER, 0, 0), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(0), #GWL_EXSTYLE) | #WS_EX_LAYOUTRTL)
AddGadgetColumn(0, 1, "2", 100)
AddGadgetItem(0, -1, "01234" + Chr(10) + "56789")
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf