Olá,
Gostaria de saber se tem como alterar a cor da fonte de uma campo text multiline.
Já tentei alterar o foreground nas propriedades, via código e não consegui. Consegui mudar o background, mas gostaria(tenho) que alterar a fonte.
Desde já agradeço a atenção.
Eduardo
Cor no campo multiline
- Toad
- Rank: DBA Pleno
- Mensagens: 253
- Registrado em: Sex, 18 Nov 2005 2:14 pm
- Localização: Seattle, WA
- Contato:
Matheus Gonçalves
matheus.dev
twitter.com/developer__c
matheus.dev
twitter.com/developer__c
CAra, não cheguei a testar, mas acho que mudando o Visual attribute dá pra fazer:
--Code in post-query:
Declare
v_curr_rec PLS_INTEGER := get_block_property('EMP',CURRENT_RECORD);
Begin
if mod(v_curr_rec, 2) = 1
then -- odd_records: white
set_block_color('EMP', v_curr_rec, 'WHITE');
else -- even records: gray
set_block_color('EMP', v_curr_rec, 'GRAY');
end if;
End;
--A Procedure:
PROCEDURE set_block_color (piv_block_name IN VARCHAR2, pin_rec_number IN NUMBER, piv_color IN VARCHAR2)
IS
/* PROCEDURE SET_BLOCK_COLOR
|| Purpose: Sets all text items in a block to a certain color through visual attributes.
||
|| Parameters: block name, record_number, color
||
|| DEMO: Verify before use in a production environment!
*/
v_item VARCHAR2 (120);
v_va_name VARCHAR2 (120);
v_va_id visualattribute;
BEGIN
-- construct the visual attribute's name ( convention: VA_<<COLOR>> )
v_va_name := 'VA_' || piv_color;
-- verify the existance of the visual attribute
v_va_id := FIND_VA (v_va_name);
IF ID_NULL (v_va_id)
THEN
-- visual attribute not found, default to 'WHITE'
v_va_name := 'WHITE';
END IF;
-- go to the first item in the block
v_item := GET_BLOCK_PROPERTY (piv_block_name, first_item);
<<va_loop>>
LOOP
-- check whether the item is a text item and whether the visual attribute was found
IF (GET_ITEM_PROPERTY (piv_block_name || '.' || v_item, item_type) = 'TEXT ITEM')
AND NOT ID_NULL (v_va_id)
THEN
-- set the item's visual attribute
SET_ITEM_INSTANCE_PROPERTY (piv_block_name || '.' || v_item, pin_rec_number, visual_attribute, v_va_name);
END IF;
-- if we'vê reached the last item in the block, exit the loop.
EXIT va_loop WHEN v_item = GET_BLOCK_PROPERTY (piv_block_name, last_item);
v_item := GET_ITEM_PROPERTY (piv_block_name || '.' || v_item, nextitem);
END LOOP va_loop;
END;
- Toad
- Rank: DBA Pleno
- Mensagens: 253
- Registrado em: Sex, 18 Nov 2005 2:14 pm
- Localização: Seattle, WA
- Contato:
Matheus Gonçalves
matheus.dev
twitter.com/developer__c
matheus.dev
twitter.com/developer__c
Pra simplificar um pouco:
E tendo um Visual Attibute chamado VERMELHO ASSIM:
SYNCHRONIZE;
SET_ITEM_INSTANCE_PROPERTY('SEU_BLOCO.SEU_CAMPO' , CURRENT_RECORD, VISUAL_ATTRIBUTE,'VERMELHO');
E tendo um Visual Attibute chamado VERMELHO ASSIM:
-
- Informação
-
Quem está online
Usuários navegando neste fórum: Nenhum usuário registrado e 16 visitantes