

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
8 messages in org.openoffice.fr.progRe: [prog] [calc]repérer les casses| From | Sent On | Attachments |
|---|---|---|
| Bernard Siaud alias Troumad | Sep 2, 2007 8:31 am | |
| Francois Gatto | Sep 3, 2007 1:00 am | |
| Bernard Siaud alias Troumad | Sep 3, 2007 6:50 am | |
| Francois Gatto | Sep 3, 2007 7:34 am | |
| Bernard Siaud alias Troumad | Oct 14, 2007 2:02 pm | |
| Francois Gatto | Oct 15, 2007 9:38 pm | |
| Bernard Siaud alias Troumad | Oct 15, 2007 9:49 pm | |
| Francois Gatto | Oct 15, 2007 9:51 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [prog] [calc]repérer les casses | Actions... |
|---|---|---|
| From: | Francois Gatto (oo...@volcar.org) | |
| Date: | Oct 15, 2007 9:38:53 pm | |
| List: | org.openoffice.fr.prog | |
Bonjour,
Bernard Siaud alias Troumad a écrit :
Francois Gatto a écrit :
Bonjour,
Bernard Siaud alias Troumad a écrit :
Bonjour
J'aimerai rendre actives des cases d'une feuille calc. C'est à dire, sans qu'elles aient l'ai de rien, quand on clique dessus, que les coordonnées de la case affichée s'inscrivent dans deux cellules. Tout en gardant cette fonction active, je souhaite pouvoir modifier le contenu de ses cases.
Est-ce faisable ?
Oui ;-)
Voici un exemple :
option explicit global oDoc as object global oMouseClickHandler as object const iClicksNumber = 1 'nombre de clics à détecter
sub StartMouseClickHandler oDoc = ThisComponent.currentController oMouseClickHandler = createUnoListener( "MCHApp_", "com.sun.star.awt.XMouseClickHandler" ) oDoc.addMouseClickHandler( oMouseClickHandler ) end sub
sub StopMouseClickHandler oDoc.removeMouseClickHandler( oMouseClickHandler ) end sub
sub MCHApp_disposing( oEvt ) end sub
function MCHApp_mousePressed( oEvt ) as boolean MCHApp_mousePressed = false end function
function MCHApp_mouseReleased( oEvt ) as boolean dim oCurSel as object dim oConv as object dim iCol as integer, iLig as long if oEvt.ClickCount = iClicksNumber then oCurSel = thisComponent.CurrentSelection oConv = thisComponent.createInstance( "com.sun.star.table.CellAddressConversion" ) oConv.Address = oCurSel.getCellAddress with oCurSel.RangeAddress 'Attention si dernière colonne iCol = .StartColumn + 1 if iCol >= 255 then msgbox( "Hep ! Limite atteinte.", 48, "OOoups !" ) iCol = iCol - 1 end if iLig = .StartRow end with thisComponent.CurrentController.ActiveSheet.getCellByPosition( iCol, iLig ).String = oConv.UserInterfaceRepresentation end if MCHApp_mouseReleased = false end function
Francois Gatto
NB : non testé sous Windows, mais je pense qu'il n'y a pas de problème.
Je viens (enfin) de l'inclure dans mon programme de scrabble : ça marche ;)
Okay !
Pourrais-tu redonner un lien vers ta réalisation, stp ? L'hiver approche ;-)
Francois Gatto







